[Issue 18972] New: __traits(getOverloads) example with 3rd argument doesn't compile
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Mon Jun 11 21:19:15 UTC 2018
https://issues.dlang.org/show_bug.cgi?id=18972
Issue ID: 18972
Summary: __traits(getOverloads) example with 3rd argument
doesn't compile
Product: D
Version: D2
Hardware: x86
OS: Windows
Status: NEW
Severity: normal
Priority: P1
Component: dlang.org
Assignee: nobody at puremagic.com
Reporter: dkorpel at live.nl
https://dlang.org/spec/traits.html#getOverloads
"The third argument is a bool, and is optional. If true, the result will also
include template overloads."
When I try this by running the example I get this:
onlineapp.d(27): Error: expected 2 arguments for getOverloads but had 3
Line 27 is:
```
27 foreach (t; __traits(getOverloads, D, "bar", true))
28 writeln(t.stringof);
```
https://run.dlang.io/is/eahvvt
I don't know whether it's the spec or implementation, but one of them is
incorrect.
--
More information about the Digitalmars-d-bugs
mailing list