Bug 21788 – __traits(identifier) on types should work like .stringof instead of erroring

Status
RESOLVED
Resolution
INVALID
Severity
enhancement
Priority
P1
Component
dmd
Product
D
Version
D2
Platform
All
OS
All
Creation time
2021-04-01T11:07:28Z
Last change time
2021-09-28T15:50:18Z
Assigned to
No Owner
Creator
Basile-z

Comments

Comment #0 by b2.temp — 2021-04-01T11:07:28Z
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.