FIR: Reorder when entries in ConeTypeContext::typeConstructor
More expected types should be checked first
This commit is contained in:
@@ -130,11 +130,11 @@ interface ConeTypeContext : TypeSystemContext, TypeSystemOptimizationContext, Ty
|
|||||||
|
|
||||||
override fun SimpleTypeMarker.typeConstructor(): TypeConstructorMarker {
|
override fun SimpleTypeMarker.typeConstructor(): TypeConstructorMarker {
|
||||||
return when (this) {
|
return when (this) {
|
||||||
is ConeCapturedType -> constructor
|
|
||||||
is ConeTypeVariableType -> lookupTag as ConeTypeVariableTypeConstructor // TODO: WTF
|
|
||||||
is ConeClassLikeType -> lookupTag.toSymbol(session)
|
is ConeClassLikeType -> lookupTag.toSymbol(session)
|
||||||
?: ErrorTypeConstructor("Unresolved: $lookupTag")
|
?: ErrorTypeConstructor("Unresolved: $lookupTag")
|
||||||
is ConeLookupTagBasedType -> lookupTag.toSymbol(session) ?: ErrorTypeConstructor("Unresolved: $lookupTag")
|
is ConeTypeParameterType -> lookupTag.typeParameterSymbol
|
||||||
|
is ConeCapturedType -> constructor
|
||||||
|
is ConeTypeVariableType -> lookupTag as ConeTypeVariableTypeConstructor // TODO: WTF
|
||||||
is ConeIntersectionType -> this
|
is ConeIntersectionType -> this
|
||||||
is ConeStubType -> variable.typeConstructor
|
is ConeStubType -> variable.typeConstructor
|
||||||
is ConeDefinitelyNotNullType -> original.typeConstructor()
|
is ConeDefinitelyNotNullType -> original.typeConstructor()
|
||||||
|
|||||||
Reference in New Issue
Block a user