Prohibit super delegation call if there is primary constructor
This commit is contained in:
+8
@@ -0,0 +1,8 @@
|
||||
// !DIAGNOSTICS: -UNUSED_PARAMETER
|
||||
class A(x: Int) {
|
||||
<!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>constructor<!>() {}
|
||||
}
|
||||
open class B(x: Int)
|
||||
class C(x: Int) : B(x) {
|
||||
constructor(): <!PRIMARY_CONSTRUCTOR_DELEGATION_CALL_EXPECTED!>super<!>(1) {}
|
||||
}
|
||||
Reference in New Issue
Block a user