JS: decomposition should preserve 'this' context with invocations
#KT-7502 fixed
This commit is contained in:
+14
@@ -0,0 +1,14 @@
|
||||
package foo
|
||||
|
||||
// Test for KT-7502
|
||||
|
||||
class A(val value: Int) {
|
||||
fun plus(num: Int): Int = this.value + num
|
||||
}
|
||||
|
||||
fun box(): String {
|
||||
assertEquals(15, A(fizz(5)).plus(buzz(10)))
|
||||
assertEquals("fizz(5);buzz(10);", pullLog())
|
||||
|
||||
return "OK"
|
||||
}
|
||||
Reference in New Issue
Block a user