[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,41 @@
package a
interface A {
val b: B
val nb: B?
}
interface B {
fun foo(): Int
}
fun test(u: A?, x: A?, y: A?, z: A?, w: A, v: A?) {
u?.b?.foo()!! // was UNNECESSARY_SAFE_CALL everywhere, because result type (of 'foo()') wasn't made nullable
u!!.b?.foo()!!
x?.b!!.foo()!!
// x?.b is not null
x!!.b!!.foo()!!
y?.nb?.foo()!!
y!!.nb?.foo()!!
z?.nb!!.foo()!!
// z?.nb is not null
z!!.nb!!.foo()!!
w.b?.foo()!!
w.b!!.foo()!!
w.nb?.foo()!!
w.nb!!.foo()!!
v!!.b.foo()!!
}
fun B?.bar(): Int = 1
fun B?.baz(): Int? = 1
fun doInt(i: Int) = i
fun test(a: A?) {
doInt(a?.b.bar()!!)
doInt(a?.b.baz()!!)
}