Do subtyping with stub types properly
1) Return stub type if we are calculating super type between two same stub types 2) Return nullable Any if those stub types are different
This commit is contained in:
+7
@@ -77,6 +77,13 @@ class ClassicTypeSystemContextForCS(override val builtIns: KotlinBuiltIns) : Typ
|
||||
return StubType(typeVariable.freshTypeConstructor() as TypeConstructor, typeVariable.defaultType().isMarkedNullable())
|
||||
}
|
||||
|
||||
override fun createStubTypeForTypeVariablesInSubtyping(typeVariable: TypeVariableMarker): StubTypeMarker {
|
||||
return StubTypeForTypeVariablesInSubtyping(
|
||||
typeVariable.freshTypeConstructor() as TypeConstructor,
|
||||
typeVariable.defaultType().isMarkedNullable()
|
||||
)
|
||||
}
|
||||
|
||||
override fun TypeConstructorMarker.isTypeVariable(): Boolean {
|
||||
return this is TypeVariableTypeConstructor
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user