fixed test case
This commit is contained in:
@@ -71,7 +71,7 @@ public final class ExtensionFunctionTest extends SingleFileTranslationTest {
|
|||||||
fooBoxTest();
|
fooBoxTest();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void TODO_FIXME_testExtensionPropertyOnClassWithExplicitAndImplicitReceiver() throws Exception {
|
public void testExtensionPropertyOnClassWithExplicitAndImplicitReceiver() throws Exception {
|
||||||
fooBoxTest();
|
fooBoxTest();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-8
@@ -2,25 +2,25 @@ package foo
|
|||||||
|
|
||||||
class Foo {
|
class Foo {
|
||||||
|
|
||||||
fun blah(): Int {
|
fun blah(value: Int): Int {
|
||||||
return 6
|
return value + 1
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
val Foo.fooImp : String
|
val Foo.fooImp : Int
|
||||||
get() {
|
get() {
|
||||||
return "implProp" + blah()
|
return blah(5)
|
||||||
}
|
}
|
||||||
|
|
||||||
val Foo.fooExp() : String
|
val Foo.fooExp : Int
|
||||||
get() {
|
get() {
|
||||||
return "explProp" + this.blah()
|
return this.blah(10)
|
||||||
}
|
}
|
||||||
|
|
||||||
fun box() : Boolean {
|
fun box() : Boolean {
|
||||||
var a = Foo()
|
var a = Foo()
|
||||||
if (a.fooImp != "implProp6") return false
|
if (a.fooImp != 6) return false
|
||||||
if (a.fooExp != "explProp6") return false
|
if (a.fooExp != 11) return false
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
Reference in New Issue
Block a user