[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,49 @@
// See KT-6665: unresolved reference (v.bar) should not produce "unreachable code" after it
fun foo(): Int {
val v = 1
val c = v.<!UNRESOLVED_REFERENCE!>bar<!> ?: return 0
return 42
}
fun foo2(): Int {
val v = 1
val c = if (true) v.<!UNRESOLVED_REFERENCE!>bar<!> else return 3
val b = c
return 42
}
fun foo3(): Int {
val v = 1
val c = when {
true -> v.<!UNRESOLVED_REFERENCE!>bar<!>
else -> return 3
}
val b = c
return 42
}
// Type + ErrorType should give Type, unless Type is Nothing
fun bar(): Int {
val v = 1
val c = v.<!UNRESOLVED_REFERENCE!>bar<!> ?: 42
return c
}
fun bar2(): Int {
val v = 1
val c = if (true) v.<!UNRESOLVED_REFERENCE!>bar<!> else 3
val b = c
return b
}
fun bar3(): Int {
val v = 1
val c = when {
true -> v.<!UNRESOLVED_REFERENCE!>bar<!>
else -> 3
}
val b = c
return b
}