ConeTypeContext: handle star projection more correctly

See substitutionSupertypePolicy & testInnerTP in FIR smoke diagnostics
This commit is contained in:
Mikhail Glukhikh
2019-06-24 10:52:10 +03:00
parent 6a21285aed
commit 152abbfb4c
@@ -404,7 +404,8 @@ class ConeTypeCheckerContext(override val isErrorTypeEqualsToAnything: Boolean,
val substitutor = if (declaration != null) {
val substitution =
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)
} else {