JS: do not alias 'this' literal in a receiver position

This commit is contained in:
Alexey Tsvetkov
2015-04-21 18:00:52 +03:00
parent 6b09b4c2b6
commit 900147385d
3 changed files with 26 additions and 1 deletions
@@ -0,0 +1,19 @@
package foo
// CHECK_CONTAINS_NO_CALLS: test
// CHECK_VARS_COUNT: function=test count=0
class A(val x: Int) {
inline fun f(): Int = x
inline fun ff(): Int = f()
}
fun test(a: A): Int = a.ff()
fun box(): String {
assertEquals(1, test(A(1)))
assertEquals(2, test(A(2)))
return "OK"
}