[NI] Refactoring: rename NonFixedType -> StubType

This commit is contained in:
Mikhail Zarechenskiy
2018-05-04 17:03:08 +03:00
parent 5187f6b060
commit 64b10d827d
8 changed files with 16 additions and 18 deletions
@@ -9,7 +9,7 @@ import org.jetbrains.kotlin.descriptors.annotations.Annotations
import org.jetbrains.kotlin.resolve.scopes.MemberScope
// This type is used as a stub for postponed type variables, which are important for coroutine inference
class NonFixedType(
class StubType(
private val originalTypeVariable: TypeConstructor,
override val isMarkedNullable: Boolean,
override val constructor: TypeConstructor =
@@ -32,7 +32,7 @@ class NonFixedType(
return if (newNullability == isMarkedNullable)
this
else
NonFixedType(originalTypeVariable, newNullability, constructor, memberScope)
StubType(originalTypeVariable, newNullability, constructor, memberScope)
}
override fun toString(): String {
@@ -186,7 +186,7 @@ object NewKotlinTypeChecker : KotlinTypeChecker {
return StrictEqualityTypeChecker.strictEqualTypes(subType.makeNullableAsSpecified(false), superType.makeNullableAsSpecified(false))
}
if (subType is NonFixedType || superType is NonFixedType) return true
if (subType is StubType || superType is StubType) return true
if (superType is NewCapturedType && superType.lowerType != null) {
when (getLowerCapturedTypePolicy(subType, superType)) {