Files
kotlin-fork/compiler/testData/codegen/box/fieldRename/simple.kt
T
2013-06-17 15:20:42 +04:00

23 lines
372 B
Kotlin

class A { }
class B { }
class Test {
public val A.prop: Int = 0;
public val B.prop: String = "1111";
public val prop: Double = 0.1;
public fun doTest() : String {
if (A().prop != 0) return "fail1"
if (B().prop != "1111") return "fail2"
if (prop != 0.1) return "fail3"
return "OK"
}
}
fun box() : String {
return Test().doTest()
}