KT-11666: Implicit nothing is allowed for overridden function / properties

This commit is contained in:
Mikhail Glukhikh
2016-03-30 14:29:47 +03:00
committed by Mikhail Glukhikh
parent 4c03aaabd4
commit 8c131f4790
3 changed files with 32 additions and 1 deletions
+14
View File
@@ -34,3 +34,17 @@ class Klass {
<!UNREACHABLE_CODE!>val <!UNUSED_VARIABLE!>x<!> =<!> y
}
}
interface Base {
val x: Int
fun foo(): String
}
class Derived : Base {
// Ok for override
override val x = null!!
override fun foo() = null!!
}