[Misc] Make NewKotlinTypeChecker non-static

This commit is contained in:
Dmitriy Novozhilov
2019-07-02 17:18:43 +03:00
committed by Dmitry Savvinov
parent 4f1e85b468
commit f026a98403
11 changed files with 39 additions and 24 deletions
@@ -273,9 +273,9 @@ class NewConstraintSystemImpl(
val resultTypeIsInputType = projectedInputCallTypes.any { inputType ->
val constructor = inputType.constructor
if (constructor is IntersectionTypeConstructor)
constructor.supertypes.any { NewKotlinTypeChecker.equalTypes(resultType, it) }
constructor.supertypes.any { NewKotlinTypeChecker.Default.equalTypes(resultType, it) }
else
NewKotlinTypeChecker.equalTypes(resultType, inputType)
NewKotlinTypeChecker.Default.equalTypes(resultType, inputType)
}
if (!resultTypeIsInputType) {
addError(OnlyInputTypesDiagnostic(variableWithConstraints.typeVariable as NewTypeVariable))
@@ -325,7 +325,7 @@ object ExpectedActualResolver {
if (a == null) return b == null
if (b == null) return false
with(NewKotlinTypeChecker) {
with(NewKotlinTypeChecker.Default) {
val context = object : ClassicTypeCheckerContext(false) {
override fun areEqualTypeConstructors(a: TypeConstructor, b: TypeConstructor): Boolean {
return isExpectedClassAndActualTypeAlias(a, b, platformModule) ||