Files
kotlin-fork/backend.native/tests/codegen/boxing/boxing11.kt
T
2017-10-20 18:25:05 +03:00

16 lines
256 B
Kotlin

package codegen.boxing.boxing11
import kotlin.test.*
fun printInt(x: Int) = println(x)
class Foo(val value: Int?) {
fun foo() {
printInt(if (value != null) value else 42)
}
}
@Test fun runTest() {
Foo(17).foo()
Foo(null).foo()
}