Skip to content

Commit

Permalink
add test case
Browse files Browse the repository at this point in the history
Signed-off-by: Jade Abraham <[email protected]>
  • Loading branch information
jabraham17 committed Dec 17, 2024
1 parent a41fefc commit d496cd5
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 0 deletions.
11 changes: 11 additions & 0 deletions test/classes/initializers/inheritance/duplicate-super-init.chpl
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
class P { }
class C: P {
proc init() {
super.init();
super.init();
}
}

proc main() {
var c = new C();
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
duplicate-super-init.chpl:3: In initializer:
duplicate-super-init.chpl:5: error: duplicate use of 'super.init()' in initializer, this should only be called once

0 comments on commit d496cd5

Please sign in to comment.