Do not approximate DefinitelyNotNullType in public declarations
Because since 1.6 they become normal denotable types ^KT-26245 Fixed
This commit is contained in:
committed by
TeamCityServer
parent
e74a0c7ef7
commit
37f923a98f
+14
@@ -0,0 +1,14 @@
|
||||
// !LANGUAGE: +DefinitelyNotNullTypeParameters
|
||||
|
||||
fun <T> foo(x: T, y: T!!) = x!!
|
||||
|
||||
fun main() {
|
||||
foo<String>("", "").length
|
||||
foo<String>("", <!NULL_FOR_NONNULL_TYPE!>null<!>).length
|
||||
foo<String?>(null, "").length
|
||||
foo<String?>(null, <!NULL_FOR_NONNULL_TYPE!>null<!>).length
|
||||
|
||||
foo("", "").length
|
||||
foo("", <!NULL_FOR_NONNULL_TYPE!>null<!>).length
|
||||
foo(null, "").length
|
||||
}
|
||||
Reference in New Issue
Block a user