Remove all type system-specific inheritors of TypeCheckerState

This commit is contained in:
Dmitriy Novozhilov
2021-08-25 14:20:08 +03:00
parent 3f6738c8bc
commit 7e6e0a3dd6
22 changed files with 193 additions and 173 deletions
@@ -22,7 +22,7 @@ import org.jetbrains.kotlin.types.AbstractNullabilityChecker
import org.jetbrains.kotlin.types.KotlinTypeFactory
import org.jetbrains.kotlin.types.SimpleType
import org.jetbrains.kotlin.types.TypeIntersector
import org.jetbrains.kotlin.types.checker.ClassicTypeCheckerState
import org.jetbrains.kotlin.types.checker.createClassicTypeCheckerState
class SlowTypeAssertionsEnabledTest : KotlinTestWithEnvironmentManagement() {
@@ -45,7 +45,7 @@ class SlowTypeAssertionsEnabledTest : KotlinTestWithEnvironmentManagement() {
try {
val superType = TypeIntersector.intersectTypes(listOf(builtIns.charSequence.defaultType, builtIns.comparable.defaultType))
AbstractNullabilityChecker.isPossibleSubtype(
ClassicTypeCheckerState(errorTypeEqualsToAnything = true), builtIns.annotationType,
createClassicTypeCheckerState(isErrorTypeEqualsToAnything = true), builtIns.annotationType,
superType as SimpleType
)
} catch (e: AssertionError) {