[FIR-TEST] Add new testdata generated after changes in previous commit

This commit is contained in:
Dmitriy Novozhilov
2019-12-11 16:16:22 +03:00
parent e9c02a1cca
commit 2536fa0cd5
4578 changed files with 104067 additions and 1 deletions
@@ -0,0 +1,67 @@
// Tests for KT-13597 (val assignment inside local object in constructor)
class Test {
val a: String
init {
val t = object {
fun some() {
// See KT-13597
a = "12"
}
}
a = "2"
t.some()
}
}
class Test2 {
init {
val t = object {
fun some() {
a = "12"
}
}
a = "2"
t.some()
}
val a: String
}
// Tests for KT-14381 (val assignment inside lambda in constructor)
fun <T> exec(f: () -> T): T = f()
class Test4 {
val a: String
init {
exec {
// See KT-14381
a = "12"
}
a = "34"
}
}
// Additional tests to prevent something broken
class Test5 {
val y: Int
val z: String
init {
val x: String
<!UNRESOLVED_REFERENCE!>x<!> = ""
z = <!UNRESOLVED_REFERENCE!>x<!>
}
constructor(y: Int) {
this.y = y
}
}