mirror of
https://github.com/jlengrand/kotlin.git
synced 2026-05-16 08:31:35 +00:00
16 lines
254 B
Kotlin
Vendored
16 lines
254 B
Kotlin
Vendored
class A(val s: String = "FAIL")
|
|
|
|
private fun foo(a: A?, aOther: A?): A {
|
|
return if (a == null) {
|
|
A()
|
|
}
|
|
else {
|
|
if (aOther == null) {
|
|
return A()
|
|
}
|
|
aOther
|
|
}
|
|
}
|
|
|
|
fun box() = foo(A("???"), A("OK")).s
|