Files
kotlin-fork/compiler/testData/diagnostics/tests/regressions/kt282.jet
T
Stepan Koltsov 07ff53d456 add trailing newlines to test files
otherwise I have to rollback dozens of files after using sed that follows conventions
2012-03-12 22:54:14 +04:00

19 lines
435 B
Plaintext

// KT-282 Nullability in extension functions and in binary calls
class Set {
fun contains(<!UNUSED_PARAMETER!>x<!> : Int) : Boolean = true
}
fun Set?.plus(<!UNUSED_PARAMETER!>x<!> : Int) : Int = 1
fun Int?.contains(<!UNUSED_PARAMETER!>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
}