[FIR] Add diagnostic for primary constructor not called

This commit is contained in:
Nick
2020-07-31 18:01:52 +03:00
committed by Mikhail Glukhikh
parent bb0e1b7390
commit 0f213e58db
12 changed files with 44 additions and 23 deletions
@@ -1,5 +1,5 @@
annotation class A() {
<!ANNOTATION_CLASS_MEMBER!>constructor(s: Nothing?) {}<!>
<!ANNOTATION_CLASS_MEMBER!><!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(s: Nothing?)<!> {}<!>
<!ANNOTATION_CLASS_MEMBER!>init {}<!>
<!ANNOTATION_CLASS_MEMBER!>fun foo() {}<!>
<!ANNOTATION_CLASS_MEMBER!>val bar: Nothing?<!>
@@ -42,16 +42,16 @@ class J<T> {
}
class F(s: String) {
constructor(i: Boolean) {}
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor(i: Boolean)<!> {}
constructor(i: Int) : <!CYCLIC_CONSTRUCTOR_DELEGATION_CALL!>this<!>(3) {}
}
class G(x: Int) {
constructor() {}
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor()<!> {}
}
class H(x: Int) {
constructor()
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor()<!>
}
class K(x: Int) {