Files
kotlin-fork/compiler/testData/diagnostics/tests/variance/privateToThis/ValReassigned.kt
T
Denis Zharkov f07566d30d Add warning for initializers with obsolete syntax
Expected 'init' keyword before class initializer
2015-03-11 17:45:26 +03:00

20 lines
262 B
Kotlin
Vendored

fun <T> getT(): T = null!!
class A<in I>(init: I) {
private val i: I
init {
i = getT()
}
private var i2 = i
private val i3: I
private var i4 = getT<I>()
init {
i2 = getT()
i3 = init
i4 = i3
}
}