[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,47 @@
fun <T> run(block: () -> T): T = block()
interface Foo {
fun foo(): Int
}
fun tesLambda(x: Int) = run {
val obj = object : Foo {
override fun foo(): Int {
return x + 1
}
}
2
}
class TestProperty {
val intConst: Int = 1
var x = 1
set(value) {
val obj = object : Foo {
override fun foo(): Int {
return intConst + 1
}
}
field = value
}
val y: Int
get() {
val obj = object : Foo {
override fun foo(): Int {
return intConst + 1
}
}
return 1
}
val z = run {
val obj = object : Foo {
override fun foo(): Int {
return x + 1
}
}
2
}
}