KT-11666: Implicit nothing is allowed for overridden function / properties
This commit is contained in:
committed by
Mikhail Glukhikh
parent
4c03aaabd4
commit
8c131f4790
@@ -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!!
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user