Files
kotlin/compiler/testData/codegen/bytecodeText/when/kt18818.kt
2018-12-21 16:20:45 +01:00

14 lines
272 B
Kotlin
Vendored

// IGNORE_BACKEND: JVM_IR
fun findUserId(username: String): Long? = null
fun main(args: Array<String>) {
val userId = findUserId("abcd")
when (userId) {
null -> println("User not found")
else -> println("User ID: $userId")
}
}
// 0 areEqual