34e6649d31
Before this commit, nullable argument could match not null parameter. Now we require also correct nullability that breaks some cases
9 lines
200 B
Kotlin
Vendored
9 lines
200 B
Kotlin
Vendored
fun bar(x: Int): RuntimeException = RuntimeException(x.toString())
|
|
|
|
fun foo() {
|
|
val x: Int? = null
|
|
|
|
if (x == null) throw <!INAPPLICABLE_CANDIDATE!>bar<!>(x)
|
|
throw bar(x)
|
|
throw bar(x)
|
|
} |