Continue processing not builder inference stub variables in the type checker during computing common super type

^KT-47148 Fixed
This commit is contained in:
Victor Petukhov
2021-06-11 15:38:50 +03:00
parent 85f4cec948
commit 559bedf5ae
8 changed files with 56 additions and 1 deletions
@@ -175,7 +175,7 @@ object NewCommonSuperTypeCalculator {
"There should be at least one non-stub type to compute common supertype but there are: $types"
}
val nonStubTypeVariables = types.filter { !it.isStubType() }
val nonStubTypeVariables = types.filter { !it.isStubTypeForBuilderInference() }
val areAllNonStubTypesNothing = nonStubTypeVariables.isNotEmpty() && nonStubTypeVariables.all { it.isNothing() }
if (nonStubTypeVariables.size == 1 && !areAllNonStubTypesNothing) return nonStubTypeVariables.single()