Files
kotlin-fork/js/js.translator/testFiles/extensionFunction/cases/extensionPropertyOnClassWithExplicitAndImplicitReceiver.kt
T
James Strachan 9b2e28c76e fixed test case
2012-07-03 08:54:25 +01:00

26 lines
332 B
Kotlin

package foo
class Foo {
fun blah(value: Int): Int {
return value + 1
}
}
val Foo.fooImp : Int
get() {
return blah(5)
}
val Foo.fooExp : Int
get() {
return this.blah(10)
}
fun box() : Boolean {
var a = Foo()
if (a.fooImp != 6) return false
if (a.fooExp != 11) return false
return true;
}