FirCallCompleter: unwrap definitely not-null type properly

#KT-50180 Fixed
This commit is contained in:
Mikhail Glukhikh
2021-12-10 17:03:44 +03:00
parent febf336d23
commit df50a8141f
6 changed files with 55 additions and 2 deletions
@@ -0,0 +1,17 @@
// FILE: Generator.java
import org.jetbrains.annotations.NotNull;
public class Generator {
@NotNull
public <T extends Value> T createValue(@NotNull String content) {
return (T) (new Value(content));
}
}
// FILE: test.kt
open class Value(val s: String)
val generator = Generator()
val y = generator.createValue("Omega") <!USELESS_CAST!>as Value<!>