[FIR-TEST] Move analysis tests to separate module

This commit is contained in:
Dmitriy Novozhilov
2020-03-18 15:10:46 +03:00
parent 3a479d5d16
commit cc07ae96b3
1477 changed files with 1001 additions and 980 deletions
@@ -0,0 +1,38 @@
// !DUMP_CFG
fun String.foo(b: Boolean): String = ""
fun String.let(block: () -> Unit) {}
fun test(x: String?) {
x?.foo(x.length == 1)
x.<!INAPPLICABLE_CANDIDATE!>length<!>
}
interface A {
fun bar(a: A): String
fun bool(): Boolean
fun id(): A
}
fun test_2(x: Any) {
(x as? A)?.bar(x)
}
fun test_3(x: Any) {
(x as? A)?.bar(x)?.foo(x.bool())?.let {
x.bool()
}
x.<!UNRESOLVED_REFERENCE!>bool<!>()
}
fun test_4(x: A?) {
x?.id()?.bool()
x.<!INAPPLICABLE_CANDIDATE!>id<!>()
}
fun Any?.boo(b: Boolean)
fun test_5(x: A?) {
x?.let { return }?.boo(x.bool())
x.<!INAPPLICABLE_CANDIDATE!>id<!>()
}