Fix a bug which caused incorrectly generated js when you call extension literal from extension function.

This commit is contained in:
pTalanov
2012-05-05 15:39:53 +04:00
parent 80aee299ba
commit 68680f702b
3 changed files with 35 additions and 12 deletions
@@ -0,0 +1,18 @@
package foo
fun A.create(init : A.() -> Unit) : A {
init()
return this
}
fun box() : Boolean {
val a = A().create {
c = 1 + t
}
return a.c == 4
}
class A() {
val t = 3
var c = 2
}