Add ir interpreter tests

This commit is contained in:
Ivan Kylchik
2021-05-19 16:27:03 +03:00
committed by TeamCityServer
parent cc2d7340dc
commit e28ab45c51
115 changed files with 5104 additions and 0 deletions
+19
View File
@@ -0,0 +1,19 @@
@CompileTimeCalculation
interface LocalObject {
fun getNum(): Int
}
@CompileTimeCalculation
fun getLocalObject(num: Int) = object : LocalObject {
override fun getNum() = num
}
@CompileTimeCalculation
class A(val a: Int) {
val localObject = object : LocalObject {
override fun getNum() = a
}
}
const val a = getLocalObject(10).<!EVALUATED: `10`!>getNum()<!>
const val b = A(2).localObject.<!EVALUATED: `2`!>getNum()<!>