Test for : KT-282 Nullability in extension functions and in binary calls
This commit is contained in:
@@ -0,0 +1,18 @@
|
||||
// KT-282 Nullability in extension functions and in binary calls
|
||||
|
||||
class Set {
|
||||
fun contains(x : Int) : Boolean = true
|
||||
}
|
||||
|
||||
fun Set?.plus(x : Int) : Int = 1
|
||||
|
||||
fun Int?.contains(x : Int) : Boolean = false
|
||||
|
||||
fun f(): Unit {
|
||||
var set : Set? = null
|
||||
val i : Int? = null
|
||||
i <!UNSAFE_INFIX_CALL!>+<!> 1
|
||||
set + 1
|
||||
1 <!UNSAFE_INFIX_CALL!>in<!> set
|
||||
1 in 2
|
||||
}
|
||||
Reference in New Issue
Block a user