FIR: Make constraint injector treat stub types as type variables

This commit is contained in:
Simon Ogorodnik
2021-11-14 16:06:45 +03:00
committed by teamcity
parent 19e2409284
commit 7b8ece8758
5 changed files with 15 additions and 2 deletions
@@ -100,6 +100,10 @@ interface ClassicTypeSystemContext : TypeSystemInferenceExtensionContext, TypeSy
return this is StubTypeForBuilderInference || isDefNotNullStubType<StubTypeForBuilderInference>()
}
override fun TypeConstructorMarker.unwrapStubTypeVariableConstructor(): TypeConstructorMarker {
return this
}
override fun StubTypeMarker.getOriginalTypeVariable(): TypeVariableTypeConstructorMarker {
require(this is AbstractStubType, this::errorMessage)
return this.originalTypeVariable as TypeVariableTypeConstructorMarker