Files
kotlin/compiler/testData/diagnostics/tests/constructorConsistency/afterInitialization.kt
2016-06-03 09:45:37 +03:00

6 lines
131 B
Kotlin
Vendored

class My(val x: Int) {
val y: Int = x + 3
val z: Int? = foo()
fun foo() = if (x >= 0) x else if (y >= 0) y else null
}