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

12 lines
278 B
Kotlin
Vendored

open class Base(val x: String) {
fun foo() = bar()
open fun bar() = -1
}
class Derived(x: String): Base(x) {
// It's still dangerous: we're not sure that foo() does not call some open function inside
val y = <!DEBUG_INFO_LEAKING_THIS!>foo<!>()
val z = x
}