mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-10 15:53:46 +00:00
17 lines
213 B
Kotlin
Vendored
17 lines
213 B
Kotlin
Vendored
fun foo(x: Int = 42) = x
|
|
|
|
class C {
|
|
val s: String
|
|
init {
|
|
val x = foo()
|
|
if (x == 42)
|
|
s = "OK"
|
|
else
|
|
s = "fail"
|
|
}
|
|
}
|
|
|
|
fun box(): String {
|
|
return C().s
|
|
}
|