KT-3159 Disallow overriding var with different type #KT-3159 fixed

This commit is contained in:
Kirill Berezin
2012-12-19 23:44:22 +04:00
committed by Andrey Breslav
parent e9613b95ac
commit e89a8c684f
8 changed files with 73 additions and 18 deletions
@@ -0,0 +1,9 @@
trait Super {
var v: CharSequence
val v2: CharSequence
}
class Sub: Super {
override var v: <!PROPERTY_TYPE_MISMATCH_ON_OVERRIDE!>String<!> = "fail"
override val v2: String = "ok"
}