34e6649d31
Before this commit, nullable argument could match not null parameter. Now we require also correct nullability that breaks some cases
22 lines
272 B
Kotlin
Vendored
22 lines
272 B
Kotlin
Vendored
open class T {
|
|
val x : Int? = null
|
|
}
|
|
|
|
class A {
|
|
companion object: T() {
|
|
}
|
|
}
|
|
|
|
class B {
|
|
companion object: T() {
|
|
}
|
|
}
|
|
|
|
fun test() {
|
|
if (A.x != null) {
|
|
useInt(A.x)
|
|
<!INAPPLICABLE_CANDIDATE!>useInt<!>(B.x)
|
|
}
|
|
}
|
|
|
|
fun useInt(i: Int) = i |