K2: report MISSING_DEPENDENCY_CLASS for lambda parameters if needed
#KT-62525 Fixed
This commit is contained in:
committed by
Space Team
parent
c03830556f
commit
06ce57ea56
+1
-1
@@ -82,7 +82,7 @@ object NewCommonSuperTypeCalculator {
|
||||
stateStubTypesNotEqual: TypeCheckerState
|
||||
): SimpleTypeMarker {
|
||||
if (types.any { it.isError() }) {
|
||||
return createErrorType("CST(${types.joinToString()}")
|
||||
return createErrorType("CST(${types.joinToString()}", delegatedType = null)
|
||||
}
|
||||
|
||||
// i.e. result type also should be marked nullable
|
||||
|
||||
+6
-2
@@ -456,7 +456,10 @@ abstract class AbstractTypeApproximator(
|
||||
val typeConstructor = type.typeConstructor()
|
||||
if (typeConstructor.parametersCount() != type.argumentsCount()) {
|
||||
return if (conf.errorType) {
|
||||
createErrorType("Inconsistent type: $type (parameters.size = ${typeConstructor.parametersCount()}, arguments.size = ${type.argumentsCount()})")
|
||||
createErrorType(
|
||||
"Inconsistent type: $type (parameters.size = ${typeConstructor.parametersCount()}, arguments.size = ${type.argumentsCount()})",
|
||||
type
|
||||
)
|
||||
} else type.defaultResult(toSuper)
|
||||
}
|
||||
|
||||
@@ -490,7 +493,8 @@ abstract class AbstractTypeApproximator(
|
||||
return if (conf.errorType) {
|
||||
createErrorType(
|
||||
"Inconsistent type: $type ($index parameter has declared variance: ${parameter.getVariance()}, " +
|
||||
"but argument variance is ${argument.getVariance()})"
|
||||
"but argument variance is ${argument.getVariance()})",
|
||||
type
|
||||
)
|
||||
} else type.defaultResult(toSuper)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user