-
-
Notifications
You must be signed in to change notification settings - Fork 609
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #7959 from RazvanN7/Issue_17373
Fix Issue 17373 - traits getOverloads + multiple interface inheritan… merged-on-behalf-of: Mike Franklin <JinShil@users.noreply.github.com>
- Loading branch information
Showing
2 changed files
with
72 additions
and
3 deletions.
There are no files selected for viewing
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
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,20 @@ | ||
| interface Foo { void visit (int); } | ||
| interface Bar { void visit(double); } | ||
| interface FooBar : Foo, Bar {} | ||
| static assert(__traits(getOverloads, FooBar, "visit").length == 2); | ||
|
|
||
| interface Fbar { void visit(char); void visit(double); } | ||
| interface Triple : Foo, Bar, Fbar {} | ||
| static assert(__traits(getOverloads, Triple, "visit").length == 3); | ||
|
|
||
| interface InheritanceMadness : FooBar, Triple {} | ||
| static assert(__traits(getOverloads, Triple, "visit").length == 3); | ||
|
|
||
| interface Simple | ||
| { | ||
| int square(int); | ||
| real square(real); | ||
| } | ||
| static assert(__traits(getOverloads, Simple, "square").length == 2); | ||
|
|
||
| void main() {} |