FirSupertypesChecker: implement six more diagnostics
This commit is contained in:
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: classInSupertypeForEnum.kt
|
||||
public final class A : R|kotlin/Any| {
|
||||
public open class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
class A
|
||||
open class A
|
||||
|
||||
interface C
|
||||
|
||||
enum class B : C, <!CLASS_IN_SUPERTYPE_FOR_ENUM!>A<!>(), Any()
|
||||
enum class B : C, <!CLASS_IN_SUPERTYPE_FOR_ENUM!>A<!>(), <!MANY_CLASSES_IN_SUPERTYPE_LIST!>Any<!>()
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// FIR_IDE_IGNORE
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>fun test(x: Int)<!> {}
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>fun test(y: Int)<!> {}
|
||||
@@ -16,7 +18,7 @@ fun test(z: Int, c: Char) {}
|
||||
|
||||
}<!>
|
||||
|
||||
<!REDECLARATION!>class B : <!SUPERTYPE_NOT_INITIALIZED!>A<!> {
|
||||
<!REDECLARATION!>class B : <!FINAL_SUPERTYPE, SUPERTYPE_NOT_INITIALIZED!>A<!> {
|
||||
<!CONFLICTING_OVERLOADS!>override fun rest(s: String)<!> {}
|
||||
|
||||
<!CONFLICTING_OVERLOADS!>fun rest(s: String)<!> {}
|
||||
|
||||
Vendored
+1
-1
@@ -125,7 +125,7 @@ FILE: cyclicConstructorDelegationCall.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final class M : R|kotlin/Any| {
|
||||
public open class M : R|kotlin/Any| {
|
||||
public constructor(m: R|kotlin/Int|): R|M| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
Vendored
+1
-1
@@ -58,7 +58,7 @@ class K(x: Int) {
|
||||
constructor() : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>() {}
|
||||
}
|
||||
|
||||
class M {
|
||||
open class M {
|
||||
constructor(m: Int)
|
||||
}
|
||||
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: delegationInInterface.kt
|
||||
public final class A : R|kotlin/Any| {
|
||||
public open class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
class A
|
||||
open class A
|
||||
|
||||
interface B : <!DELEGATION_IN_INTERFACE, INTERFACE_WITH_SUPERCLASS!>A<!> by <!UNRESOLVED_REFERENCE!>a<!> {
|
||||
val a: A
|
||||
|
||||
Vendored
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: explicitDelegationCallRequired.kt
|
||||
public final class A : R|kotlin/Any| {
|
||||
public open class A : R|kotlin/Any| {
|
||||
public constructor(x: R|kotlin/Int|): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
class A(x: Int) {
|
||||
open class A(x: Int) {
|
||||
constructor(z: String) : this(10)
|
||||
}
|
||||
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
FILE: interfaceWithSuperclass.kt
|
||||
public final class A : R|kotlin/Any| {
|
||||
public open class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
@@ -9,7 +9,7 @@ FILE: interfaceWithSuperclass.kt
|
||||
}
|
||||
public abstract interface C : R|kotlin/Any| {
|
||||
}
|
||||
public final class D : R|kotlin/Any| {
|
||||
public open class D : R|kotlin/Any| {
|
||||
public constructor(): R|D| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
+3
-3
@@ -1,8 +1,8 @@
|
||||
class A
|
||||
open class A
|
||||
|
||||
interface B : <!INTERFACE_WITH_SUPERCLASS, SUPERTYPE_INITIALIZED_IN_INTERFACE!>A<!>()
|
||||
|
||||
interface C
|
||||
class D
|
||||
open class D
|
||||
|
||||
interface E : <!INTERFACE_WITH_SUPERCLASS, SUPERTYPE_INITIALIZED_IN_INTERFACE!>A<!>(), C, <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>D<!>()
|
||||
interface E : <!INTERFACE_WITH_SUPERCLASS, SUPERTYPE_INITIALIZED_IN_INTERFACE!>A<!>(), C, <!MANY_CLASSES_IN_SUPERTYPE_LIST, SUPERTYPE_INITIALIZED_IN_INTERFACE!>D<!>()
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: notASupertype.kt
|
||||
public final class A : R|kotlin/Any| {
|
||||
public open class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
class A {
|
||||
open class A {
|
||||
fun f() {}
|
||||
}
|
||||
|
||||
|
||||
+3
-1
@@ -1,3 +1,5 @@
|
||||
// FIR_IDE_IGNORE
|
||||
|
||||
sealed class A
|
||||
|
||||
<!REDECLARATION!>class B : A()<!>
|
||||
@@ -6,7 +8,7 @@ interface C : <!INTERFACE_WITH_SUPERCLASS!>A<!>
|
||||
|
||||
interface D : C, <!INTERFACE_WITH_SUPERCLASS!>A<!>
|
||||
|
||||
class E : B, A()
|
||||
class E : <!SINGLETON_IN_SUPERTYPE!>B<!>, <!MANY_CLASSES_IN_SUPERTYPE_LIST!>A<!>()
|
||||
|
||||
sealed class P {
|
||||
object H: P()
|
||||
|
||||
+1
-1
@@ -1,5 +1,5 @@
|
||||
FILE: superIsNotAnExpression.kt
|
||||
public final class A : R|kotlin/Any| {
|
||||
public open class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
+1
-1
@@ -1,4 +1,4 @@
|
||||
class A
|
||||
open class A
|
||||
|
||||
class B: A() {
|
||||
fun act() {
|
||||
|
||||
Vendored
+1
-1
@@ -3,7 +3,7 @@ FILE: supertypeInitializedInInterface.kt
|
||||
}
|
||||
public abstract interface B : R|A| {
|
||||
}
|
||||
public final class C : R|kotlin/Any| {
|
||||
public open class C : R|kotlin/Any| {
|
||||
public constructor(): R|C| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
Vendored
+2
-2
@@ -2,12 +2,12 @@ interface A
|
||||
|
||||
interface B : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>A<!>()
|
||||
|
||||
class C
|
||||
open class C
|
||||
|
||||
interface D : <!INTERFACE_WITH_SUPERCLASS, SUPERTYPE_INITIALIZED_IN_INTERFACE!>C<!>()
|
||||
|
||||
interface E : <!INTERFACE_WITH_SUPERCLASS, SUPERTYPE_INITIALIZED_IN_INTERFACE!>Any<!>()
|
||||
|
||||
interface F : A, <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>B<!>(), <!INTERFACE_WITH_SUPERCLASS!>C<!>, <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>D<!>(), <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>Any<!>() {
|
||||
interface F : A, <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>B<!>(), <!INTERFACE_WITH_SUPERCLASS!>C<!>, <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>D<!>(), <!MANY_CLASSES_IN_SUPERTYPE_LIST, SUPERTYPE_INITIALIZED_IN_INTERFACE!>Any<!>() {
|
||||
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,5 +1,5 @@
|
||||
FILE: supertypeInitializedWithoutPrimaryConstructor.kt
|
||||
public final class A : R|kotlin/Any| {
|
||||
public open class A : R|kotlin/Any| {
|
||||
public constructor(): R|A| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
@@ -11,7 +11,7 @@ FILE: supertypeInitializedWithoutPrimaryConstructor.kt
|
||||
}
|
||||
|
||||
}
|
||||
public final class C : R|kotlin/Any| {
|
||||
public open class C : R|kotlin/Any| {
|
||||
public constructor(x: R|kotlin/Int|): R|C| {
|
||||
super<R|kotlin/Any|>()
|
||||
}
|
||||
|
||||
+2
-2
@@ -1,7 +1,7 @@
|
||||
class A
|
||||
open class A
|
||||
class B : <!SUPERTYPE_NOT_INITIALIZED!>A<!>
|
||||
|
||||
class C(x: Int)
|
||||
open class C(x: Int)
|
||||
<!NO_VALUE_FOR_PARAMETER!>class D : <!SUPERTYPE_NOT_INITIALIZED!>C<!><!>
|
||||
class E : C(10)
|
||||
class F() : C(10)
|
||||
|
||||
Reference in New Issue
Block a user