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

14 lines
230 B
Kotlin
Vendored

class My {
val x: String
constructor() {
val y = bar(<!DEBUG_INFO_LEAKING_THIS!>this<!>)
val z = <!DEBUG_INFO_LEAKING_THIS!>foo<!>()
x = "$y$z"
}
fun foo() = x
}
fun bar(arg: My) = arg.x