Minor: move local lateinit tests to lateinit/local
This commit is contained in:
@@ -0,0 +1,24 @@
|
||||
// !LANGUAGE: +LateinitLocalVariables
|
||||
|
||||
fun test1() {
|
||||
lateinit var s: String
|
||||
s.length
|
||||
}
|
||||
|
||||
fun test2() {
|
||||
lateinit var s: String
|
||||
run {
|
||||
s = ""
|
||||
}
|
||||
s.length
|
||||
}
|
||||
|
||||
fun almostAlwaysTrue(): Boolean = true
|
||||
|
||||
fun test3() {
|
||||
lateinit var s: String
|
||||
if (almostAlwaysTrue()) {
|
||||
s = ""
|
||||
}
|
||||
s.length
|
||||
}
|
||||
Reference in New Issue
Block a user