Files
kotlin-fork/compiler/testData/diagnostics/tests/controlFlowAnalysis/unnecessaryLateinit/secondaryConstructorDelegateLoop.kt
T
Mikhail Glukhikh 4da9a101cf UNNECESSARY_LATEINIT warning introduced #KT-13295 Fixed
(cherry picked from commit 88f9938)
2016-09-27 18:48:50 +03:00

19 lines
435 B
Kotlin
Vendored

// !DIAGNOSTICS: -UNUSED_PARAMETER
class Foo {
<!UNNECESSARY_LATEINIT!>lateinit<!> var bar: String
constructor() {
bar = ""
}
constructor(a: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(a, 0, 0) {
}
constructor(a: Int, b: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(a) {
}
constructor(a: Int, b: Int, c: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(a, b) {
}
}