[FIR] Generate an error primary constructor when super call is invalid
Merge-request: KT-MR-11026 Merged-by: Egor Kulikov <Egor.Kulikov@jetbrains.com>
This commit is contained in:
+6
-6
@@ -9,9 +9,9 @@ abstract class D : suspend () -> Int<!NO_CONSTRUCTOR!>()<!>
|
||||
abstract class E : (suspend () -> Int)<!NO_CONSTRUCTOR!>()<!>
|
||||
abstract class F : kotlin.coroutines.SuspendFunction0<Int><!NO_CONSTRUCTOR!>()<!>
|
||||
|
||||
interface IA : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>() -> Int<!>()
|
||||
interface IB : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>(() -> Int)<!>()
|
||||
interface IC : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>Function0<Int><!>()
|
||||
interface ID : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>suspend () -> Int<!>()
|
||||
interface IE : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>(suspend () -> Int)<!>()
|
||||
interface IF : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>kotlin.coroutines.SuspendFunction0<Int><!>()
|
||||
interface IA : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>() -> Int<!><!NO_CONSTRUCTOR!>()<!>
|
||||
interface IB : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>(() -> Int)<!><!NO_CONSTRUCTOR!>()<!>
|
||||
interface IC : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>Function0<Int><!><!NO_CONSTRUCTOR!>()<!>
|
||||
interface ID : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>suspend () -> Int<!><!NO_CONSTRUCTOR!>()<!>
|
||||
interface IE : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>(suspend () -> Int)<!><!NO_CONSTRUCTOR!>()<!>
|
||||
interface IF : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>kotlin.coroutines.SuspendFunction0<Int><!><!NO_CONSTRUCTOR!>()<!>
|
||||
|
||||
+6
-6
@@ -9,9 +9,9 @@ abstract class D : suspend () -> Int<!NO_CONSTRUCTOR!>()<!>
|
||||
abstract class E : (suspend () -> Int)<!NO_CONSTRUCTOR!>()<!>
|
||||
abstract class F : kotlin.coroutines.SuspendFunction0<Int><!NO_CONSTRUCTOR!>()<!>
|
||||
|
||||
interface IA : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>() -> Int<!>()
|
||||
interface IB : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>(() -> Int)<!>()
|
||||
interface IC : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>Function0<Int><!>()
|
||||
interface ID : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>suspend () -> Int<!>()
|
||||
interface IE : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>(suspend () -> Int)<!>()
|
||||
interface IF : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>kotlin.coroutines.SuspendFunction0<Int><!>()
|
||||
interface IA : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>() -> Int<!><!NO_CONSTRUCTOR!>()<!>
|
||||
interface IB : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>(() -> Int)<!><!NO_CONSTRUCTOR!>()<!>
|
||||
interface IC : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>Function0<Int><!><!NO_CONSTRUCTOR!>()<!>
|
||||
interface ID : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>suspend () -> Int<!><!NO_CONSTRUCTOR!>()<!>
|
||||
interface IE : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>(suspend () -> Int)<!><!NO_CONSTRUCTOR!>()<!>
|
||||
interface IF : <!SUPERTYPE_INITIALIZED_IN_INTERFACE!>kotlin.coroutines.SuspendFunction0<Int><!><!NO_CONSTRUCTOR!>()<!>
|
||||
|
||||
compiler/testData/diagnostics/tests/constructorConsistency/errorInsideDelegationCallNoPrimary.fir.kt
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
open class A(i: Int)
|
||||
|
||||
<!SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR!>class B : A(<!UNRESOLVED_REFERENCE!>x<!>) {
|
||||
constructor(i: Int) : super(i)
|
||||
}<!>
|
||||
Vendored
+5
@@ -0,0 +1,5 @@
|
||||
open class A(i: Int)
|
||||
|
||||
class B : <!SUPERTYPE_INITIALIZED_WITHOUT_PRIMARY_CONSTRUCTOR!>A(<!DEBUG_INFO_MISSING_UNRESOLVED!>x<!>)<!> {
|
||||
constructor(i: Int) : super(i)
|
||||
}
|
||||
Reference in New Issue
Block a user