[Issue 21788] New: __traits(identifier) on types should work like .stringof instead of erroring

d-bugmail at puremagic.com d-bugmail at puremagic.com
Thu Apr 1 11:07:28 UTC 2021


https://issues.dlang.org/show_bug.cgi?id=21788

          Issue ID: 21788
           Summary: __traits(identifier) on types should work like
                    .stringof instead of erroring
           Product: D
           Version: D2
          Hardware: All
                OS: All
            Status: NEW
          Severity: enhancement
          Priority: P1
         Component: dmd
          Assignee: nobody at puremagic.com
          Reporter: b2.temp at gmx.com

The code:

---
pragma(msg, __traits(identifier, void*)); 
---

gives:

> Error: argument `void*` has no identifier

If the argument of `__traits(identifier)` is a type it could just returns the
`.stringof` of the argument.

--


More information about the Digitalmars-d-bugs mailing list