FIR: Refine inference constraints when type variable in flexible position
That issue might be fixed via changing TypeVariableMarker.shouldBeFlexible at ConeConstraintSystemUtilContext but this and some other tricks have been added because of incorrect handling of constraints where type variable has a flexible bound ^KT-51168 Fixed
This commit is contained in:
compiler/testData/diagnostics/foreignAnnotationsTests/java8Tests/jspecify/strictMode/Captured.fir.kt
Vendored
-17
@@ -1,17 +0,0 @@
|
||||
// JSPECIFY_STATE: strict
|
||||
// !LANGUAGE: +TypeEnhancementImprovementsInStrictMode
|
||||
// FILE: J1.java
|
||||
import org.jetbrains.annotations.Nullable;
|
||||
|
||||
public interface J1<T> {
|
||||
@Nullable
|
||||
public static <T> T foo(J1<T> x) { return null; }
|
||||
}
|
||||
|
||||
// FILE: J2.java
|
||||
import org.jspecify.nullness.Nullable;
|
||||
|
||||
public interface J2<V extends @Nullable Object> extends J1<V> { }
|
||||
|
||||
// FILE: kotlin.kt
|
||||
private fun J2<*>.bar() = <!NEW_INFERENCE_ERROR!>J1.foo(this)<!>
|
||||
Vendored
+1
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
// JSPECIFY_STATE: strict
|
||||
// !LANGUAGE: +TypeEnhancementImprovementsInStrictMode
|
||||
// FILE: J1.java
|
||||
|
||||
Reference in New Issue
Block a user