FIR: introduce not implemented checker
This commit is contained in:
@@ -12,9 +12,9 @@ fun foo() {
|
||||
x.foo()
|
||||
}
|
||||
|
||||
object Rr : SomeTrait {}
|
||||
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>object Rr<!> : SomeTrait {}
|
||||
|
||||
class C : SomeTrait {}
|
||||
<!ABSTRACT_MEMBER_NOT_IMPLEMENTED!>class C<!> : SomeTrait {}
|
||||
|
||||
fun foo2() {
|
||||
val r = object : Runnable {} //no error
|
||||
|
||||
@@ -1,30 +0,0 @@
|
||||
//KT-559 Forbid abstract method call through super
|
||||
|
||||
package kt559
|
||||
|
||||
abstract class A {
|
||||
abstract val i : Int
|
||||
|
||||
abstract fun foo() : Int
|
||||
|
||||
fun fff() {}
|
||||
}
|
||||
|
||||
abstract class D(): A() {
|
||||
override val i : Int = 34
|
||||
}
|
||||
|
||||
class C() : D() {
|
||||
fun test() {
|
||||
super.i
|
||||
}
|
||||
}
|
||||
|
||||
class B() : A() {
|
||||
override fun foo(): Int {
|
||||
super.<!ABSTRACT_SUPER_CALL!>i<!>
|
||||
|
||||
super.fff() //everything is ok
|
||||
return super.<!ABSTRACT_SUPER_CALL!>foo<!>()
|
||||
}
|
||||
}
|
||||
@@ -1,3 +1,4 @@
|
||||
// FIR_IDENTICAL
|
||||
//KT-559 Forbid abstract method call through super
|
||||
|
||||
package kt559
|
||||
|
||||
Reference in New Issue
Block a user