FIR checker: report SUPERTYPE_NOT_INITIALIZED
Combined this and the checker of SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR together. Also fixed SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR incorrectly repoted as warning instead of error.
This commit is contained in:
committed by
Dmitriy Novozhilov
parent
6134c00698
commit
56bec6997c
+1
-1
@@ -16,7 +16,7 @@ fun test(z: Int, c: Char) {}
|
||||
|
||||
}<!>
|
||||
|
||||
<!REDECLARATION!>class B : A {
|
||||
<!REDECLARATION!>class B : <!SUPERTYPE_NOT_INITIALIZED!>A<!> {
|
||||
<!CONFLICTING_OVERLOADS!>override fun rest(s: String)<!> {}
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>fun rest(s: String)<!> {}
|
||||
|
||||
@@ -2,7 +2,7 @@ class A {
|
||||
fun f() {}
|
||||
}
|
||||
|
||||
class B : A {
|
||||
class B : <!SUPERTYPE_NOT_INITIALIZED!>A<!> {
|
||||
fun g() {
|
||||
<!NOT_A_SUPERTYPE!>super<String><!>.<!UNRESOLVED_REFERENCE!>f<!>()
|
||||
super<A>.f()
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ open class A {
|
||||
open var test: Number = 10
|
||||
}
|
||||
|
||||
open class B : A {
|
||||
open class B : <!SUPERTYPE_NOT_INITIALIZED!>A<!> {
|
||||
override var test: <!VAR_TYPE_MISMATCH_ON_OVERRIDE!>Double<!> = 20.0
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -2,7 +2,7 @@ open class A {
|
||||
open fun test(): Number = 10
|
||||
}
|
||||
|
||||
open class B : A {
|
||||
open class B : <!SUPERTYPE_NOT_INITIALIZED!>A<!> {
|
||||
override fun test(): Double = 20.0
|
||||
fun test(x: Int) = x
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,8 +1,8 @@
|
||||
class A
|
||||
class B : A
|
||||
class B : <!SUPERTYPE_NOT_INITIALIZED!>A<!>
|
||||
|
||||
class C(x: Int)
|
||||
<!INAPPLICABLE_CANDIDATE!>class D : C<!>
|
||||
<!INAPPLICABLE_CANDIDATE!>class D : <!SUPERTYPE_NOT_INITIALIZED!>C<!><!>
|
||||
class E : C(10)
|
||||
class F() : C(10)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user