-
Notifications
You must be signed in to change notification settings - Fork 428
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Signed-off-by: Jade Abraham <[email protected]>
- Loading branch information
1 parent
a41fefc
commit d496cd5
Showing
2 changed files
with
13 additions
and
0 deletions.
There are no files selected for viewing
11 changes: 11 additions & 0 deletions
11
test/classes/initializers/inheritance/duplicate-super-init.chpl
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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(); | ||
} |
2 changes: 2 additions & 0 deletions
2
test/classes/initializers/inheritance/duplicate-super-init.good
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |