Introduce not null type parameter capability
Java nullability annotations may generate types that currently are not denotable in Kotlin:
class Java {
void <F> foo(@NotNull F f) {}
}
Type of given value parameter should be not nullable under any substitution:
String/String?/String! because of annotation contract.
NB: Currently there is no full analogues for such types in pure kotlin
This commit is contained in:
+1
-1
@@ -38,6 +38,6 @@ fun main(a: A<String>, a1: A<String?>) {
|
||||
a.baz(<!NULL_FOR_NONNULL_TYPE!>null<!>)<!UNSAFE_CALL!>.<!>length
|
||||
|
||||
a1.baz("")!!.length
|
||||
a1.baz(null)!!.length
|
||||
a1.baz(<!NULL_FOR_NONNULL_TYPE!>null<!>)!!.length
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user