JS backend : added test for local extension function.
This commit is contained in:
@@ -131,4 +131,8 @@ public class FunctionTest extends AbstractExpressionTest {
|
|||||||
public void testManglingAnyMethods() throws Exception {
|
public void testManglingAnyMethods() throws Exception {
|
||||||
checkFooBoxIsOk();
|
checkFooBoxIsOk();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testLocalExtFunction() throws Exception {
|
||||||
|
checkFooBoxIsOk();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,9 @@
|
|||||||
|
package foo
|
||||||
|
|
||||||
|
fun box(): String {
|
||||||
|
fun String.test(i: Int) = this + i + "OK"
|
||||||
|
val a = "foo".test(32)
|
||||||
|
if (a != "foo32OK") return "$a"
|
||||||
|
|
||||||
|
return "OK"
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user