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
+14
View File
@@ -0,0 +1,14 @@
@CompileTimeCalculation
open class A {
open fun String.getSize() = this.length
fun returnSizeOf(str: String) = str.getSize()
}
@CompileTimeCalculation
class B : A() {
override fun String.getSize() = -1
}
const val a = A().<!EVALUATED: `4`!>returnSizeOf("1234")<!>
const val b = B().<!EVALUATED: `-1`!>returnSizeOf("1234")<!>