Bug 15199 – Cannot Resolve Type When Calling stringof Property of a Template
Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2015-10-13T05:56:09Z
Last change time
2020-07-04T20:15:53Z
Assigned to
No Owner
Creator
Meta
Comments
Comment #0 by monkeyworks12 — 2015-10-13T05:56:09Z
void main()
{
struct Test
{
auto ref I(T)(auto ref T t) { return t; }
}
Test t;
//Error: cannot resolve type for t.I(T)(auto ref T t)
pragma(msg, t.I.stringof);
}
Related:
https://issues.dlang.org/show_bug.cgi?id=14184
Comment #1 by b2.temp — 2020-07-04T18:46:04Z
you're doing a CTFE ".stringof" call on the result of I.
stringof on function must be replaced by __traits(identifier), which is not ambiguous.
Comment #2 by monkeyworks12 — 2020-07-04T20:15:53Z
Optional parens are great, but sometimes I hate them.