added test cases to try reproduce yesterdays JS bug with missing "this.drop(1)" in List.tail property, found another JS compile issue...
This commit is contained in:
@@ -66,4 +66,12 @@ public final class ExtensionFunctionTest extends SingleFileTranslationTest {
|
|||||||
public void testExtensionFunctionCalledFromExtensionFunction() throws Exception {
|
public void testExtensionFunctionCalledFromExtensionFunction() throws Exception {
|
||||||
fooBoxTest();
|
fooBoxTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public void testExtensionOnClassWithExplicitAndImplicitReceiver() throws Exception {
|
||||||
|
fooBoxTest();
|
||||||
|
}
|
||||||
|
|
||||||
|
public void TODO_FIXME_testExtensionPropertyOnClassWithExplicitAndImplicitReceiver() throws Exception {
|
||||||
|
fooBoxTest();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+24
@@ -0,0 +1,24 @@
|
|||||||
|
package foo
|
||||||
|
|
||||||
|
class Foo {
|
||||||
|
|
||||||
|
fun blah(): Int {
|
||||||
|
return 5
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
public inline fun Foo.fooImp() : String {
|
||||||
|
return "impl" + blah()
|
||||||
|
}
|
||||||
|
|
||||||
|
public inline fun Foo.fooExp() : String {
|
||||||
|
return "expl" + this.blah()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() : Boolean {
|
||||||
|
var a = Foo()
|
||||||
|
if (a.fooImp() != "impl5") return false
|
||||||
|
if (a.fooExp() != "expl5") return false
|
||||||
|
return true;
|
||||||
|
}
|
||||||
+26
@@ -0,0 +1,26 @@
|
|||||||
|
package foo
|
||||||
|
|
||||||
|
class Foo {
|
||||||
|
|
||||||
|
fun blah(): Int {
|
||||||
|
return 6
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
val Foo.fooImp : String
|
||||||
|
get() {
|
||||||
|
return "implProp" + blah()
|
||||||
|
}
|
||||||
|
|
||||||
|
val Foo.fooExp() : String
|
||||||
|
get() {
|
||||||
|
return "explProp" + this.blah()
|
||||||
|
}
|
||||||
|
|
||||||
|
fun box() : Boolean {
|
||||||
|
var a = Foo()
|
||||||
|
if (a.fooImp != "implProp6") return false
|
||||||
|
if (a.fooExp != "explProp6") return false
|
||||||
|
return true;
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user