FIR: Fix inference case with flexible captured types
Previsously, errors have been ignored because we ignored errors raised from the completion phase See the comment above the createConstraintPartForLowerBoundAndFlexibleTypeVariable
This commit is contained in:
committed by
teamcityserver
parent
c758069d7c
commit
faa5e46396
+1
-5
@@ -237,11 +237,7 @@ abstract class AbstractTypeCheckerContextForConstraintSystem(override val typeSy
|
||||
when (subType) {
|
||||
is SimpleTypeMarker ->
|
||||
// Foo <: T! -- (Foo!! .. Foo) <: T
|
||||
if (subType.isMarkedNullable()) {
|
||||
subType // prefer nullable type to flexible one: `Foo? <: (T..T?)` => lowerConstraint = `Foo?`
|
||||
} else {
|
||||
createFlexibleType(subType, subType.withNullability(true))
|
||||
}
|
||||
subType.createConstraintPartForLowerBoundAndFlexibleTypeVariable()
|
||||
|
||||
is FlexibleTypeMarker ->
|
||||
// (Foo..Bar) <: T! -- (Foo!! .. Bar) <: T
|
||||
|
||||
Reference in New Issue
Block a user