JS: do not alias 'this' literal in a receiver position
This commit is contained in:
@@ -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"
|
||||
}
|
||||
Reference in New Issue
Block a user