Support anonymous object constructor transformation and inline

This commit is contained in:
Mikhael Bogdanov
2014-04-24 16:14:17 +04:00
parent 9181302ce4
commit c5e9ea0d29
14 changed files with 350 additions and 87 deletions
@@ -0,0 +1,30 @@
import test.*
fun test1(): String {
val o = "O"
val result = doWork ({o}, {"K"})
return result.getO() + result.getK()
}
fun test2() : String {
//same names as in object
val o1 = "O"
val k1 = "K"
val result = doWorkInConstructor ({o1}, {k1})
return result.getO() + result.getK()
}
fun box() : String {
val result1 = test1();
if (result1 != "OK") return "fail1 $result1"
val result2 = test2();
if (result2 != "OK") return "fail2 $result2"
return "OK"
}