K2: report MISSING_DEPENDENCY_CLASS for lambda parameters if needed

#KT-62525 Fixed
This commit is contained in:
Mikhail Glukhikh
2023-12-01 15:20:28 +01:00
committed by Space Team
parent c03830556f
commit 06ce57ea56
23 changed files with 325 additions and 41 deletions
@@ -87,7 +87,7 @@ interface TypeSystemTypeFactoryContext: TypeSystemBuiltInsContext {
fun createTypeArgument(type: KotlinTypeMarker, variance: TypeVariance): TypeArgumentMarker
fun createStarProjection(typeParameter: TypeParameterMarker): TypeArgumentMarker
fun createErrorType(debugName: String): SimpleTypeMarker
fun createErrorType(debugName: String, delegatedType: SimpleTypeMarker?): SimpleTypeMarker
fun createUninferredType(constructor: TypeConstructorMarker): KotlinTypeMarker
}
@@ -597,7 +597,6 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSy
override fun SimpleTypeMarker.replaceArguments(replacement: (TypeArgumentMarker) -> TypeArgumentMarker): SimpleTypeMarker {
require(this is SimpleType, this::errorMessage)
@Suppress("UNCHECKED_CAST")
return this.replaceArgumentsByExistingArgumentsWith(replacement)
}
@@ -714,7 +713,7 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSy
return captureFromExpressionInternal(type as UnwrappedType)
}
override fun createErrorType(debugName: String): SimpleTypeMarker {
override fun createErrorType(debugName: String, delegatedType: SimpleTypeMarker?): SimpleTypeMarker {
return ErrorUtils.createErrorType(ErrorTypeKind.RESOLUTION_ERROR_TYPE, debugName)
}
@@ -922,8 +921,6 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSy
override val isK2: Boolean
get() = false
class WA // Workaround for KT-52313
}
fun TypeVariance.convertVariance(): Variance {