fixed test case

This commit is contained in:
James Strachan
2012-07-03 08:54:25 +01:00
parent b960bea2d9
commit 9b2e28c76e
2 changed files with 9 additions and 9 deletions
@@ -71,7 +71,7 @@ public final class ExtensionFunctionTest extends SingleFileTranslationTest {
fooBoxTest();
}
public void TODO_FIXME_testExtensionPropertyOnClassWithExplicitAndImplicitReceiver() throws Exception {
public void testExtensionPropertyOnClassWithExplicitAndImplicitReceiver() throws Exception {
fooBoxTest();
}
}
@@ -2,25 +2,25 @@ package foo
class Foo {
fun blah(): Int {
return 6
fun blah(value: Int): Int {
return value + 1
}
}
val Foo.fooImp : String
val Foo.fooImp : Int
get() {
return "implProp" + blah()
return blah(5)
}
val Foo.fooExp() : String
val Foo.fooExp : Int
get() {
return "explProp" + this.blah()
return this.blah(10)
}
fun box() : Boolean {
var a = Foo()
if (a.fooImp != "implProp6") return false
if (a.fooExp != "explProp6") return false
if (a.fooImp != 6) return false
if (a.fooExp != 11) return false
return true;
}