KT-1417 & KT-1398 proper access flags for backing fields

This commit is contained in:
Alex Tkachman
2012-02-24 09:57:30 +02:00
parent de3d5edb2a
commit 7f2a8100c4
4 changed files with 32 additions and 1 deletions
@@ -0,0 +1,7 @@
open class Base(val bar: String)
class Foo(bar: String) : Base(bar) {
fun something() = (bar as java.lang.String).toUpperCase()
}
fun box() = Foo("ok").something()
@@ -0,0 +1,9 @@
package pack
open class A(val value: String )
class B(value: String) : A(value) {
fun toString() = "B($value)";
}
fun box() = if (B("4").toString() == "B(4)") "OK" else "fail"