Do preparation of enhancement as well (for types with enhancement), during subtype checks

^KT-47899 Fixed
This commit is contained in:
Victor Petukhov
2021-07-29 11:23:13 +03:00
committed by teamcityserver
parent c5d783596d
commit 5684b6977a
6 changed files with 37 additions and 1 deletions
@@ -0,0 +1,15 @@
// JSPECIFY_STATE: warn
// FILE: Foo.java
import org.jspecify.nullness.Nullable;
public class Foo {
public static <T> void gauge(@Nullable T stateObject) {}
}
// FILE: main.kt
fun <T> test(metric: T) {
if (metric is String) {
Foo.gauge(<!DEBUG_INFO_SMARTCAST!>metric<!>)
}
}