ConeTypeContext: handle star projection more correctly
See substitutionSupertypePolicy & testInnerTP in FIR smoke diagnostics
This commit is contained in:
@@ -404,7 +404,8 @@ class ConeTypeCheckerContext(override val isErrorTypeEqualsToAnything: Boolean,
|
|||||||
val substitutor = if (declaration != null) {
|
val substitutor = if (declaration != null) {
|
||||||
val substitution =
|
val substitution =
|
||||||
declaration.typeParameters.zip(type.typeArguments).associate { (parameter, argument) ->
|
declaration.typeParameters.zip(type.typeArguments).associate { (parameter, argument) ->
|
||||||
parameter.symbol as ConeTypeParameterSymbol to ((argument as? ConeTypedProjection)?.type ?: TODO("ANY?"))
|
parameter.symbol as ConeTypeParameterSymbol to ((argument as? ConeTypedProjection)?.type
|
||||||
|
?: StandardClassIds.Any(session.firSymbolProvider).constructType(emptyArray(), isNullable = true))
|
||||||
}
|
}
|
||||||
ConeSubstitutorByMap(substitution)
|
ConeSubstitutorByMap(substitution)
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
Reference in New Issue
Block a user