Minor. Reformat PCLA related part at ResultTypeResolver
This commit is contained in:
committed by
Space Team
parent
05b5cdc918
commit
b86c0d990e
+13
-6
@@ -222,12 +222,19 @@ class ResultTypeResolver(
|
|||||||
!lowerType.contains { it.asSimpleType()?.isStubTypeForVariableInSubtyping() == true }
|
!lowerType.contains { it.asSimpleType()?.isStubTypeForVariableInSubtyping() == true }
|
||||||
}
|
}
|
||||||
|
|
||||||
if (typesWithoutStubs.isNotEmpty()) {
|
when {
|
||||||
commonSuperType = computeCommonSuperType(typesWithoutStubs)
|
typesWithoutStubs.isNotEmpty() -> {
|
||||||
} else if (outerSystemVariablesPrefixSize > 0) {
|
commonSuperType = computeCommonSuperType(typesWithoutStubs)
|
||||||
// outerSystemVariablesPrefixSize > 0 only for PCLA (K2)
|
}
|
||||||
@OptIn(K2Only::class)
|
// `typesWithoutStubs.isEmpty()` means that there are no lower constraints without type variables.
|
||||||
commonSuperType = createSubstitutionFromSubtypingStubTypesToTypeVariables().safeSubstitute(commonSuperType)
|
// It's only possible for the PCLA case, because otherwise none of the constraints would be considered as proper.
|
||||||
|
// So, we just get currently computed `commonSuperType` and substitute all local stub types
|
||||||
|
// with corresponding type variables.
|
||||||
|
outerSystemVariablesPrefixSize > 0 -> {
|
||||||
|
// outerSystemVariablesPrefixSize > 0 only for PCLA (K2)
|
||||||
|
@OptIn(K2Only::class)
|
||||||
|
commonSuperType = createSubstitutionFromSubtypingStubTypesToTypeVariables().safeSubstitute(commonSuperType)
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user