FIR: introduce not implemented checker

This commit is contained in:
Mikhail Glukhikh
2021-03-18 22:24:14 +03:00
parent 9ae41f5c07
commit 9ce8420491
50 changed files with 320 additions and 147 deletions
@@ -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