Prohibit super delegation call if there is primary constructor

This commit is contained in:
Denis Zharkov
2015-02-13 16:38:45 +03:00
parent 835a0df13a
commit f673f4ff47
6 changed files with 47 additions and 0 deletions
@@ -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) {}
}