Probably trivial, but VERY frustrating compiler bug

FeepingCreature feepingcreature at gmail.com
Fri Aug 14 05:26:06 UTC 2020


On Friday, 14 August 2020 at 03:56:38 UTC, Steven Schveighoffer 
wrote:
> On 8/13/20 6:20 PM, Adam D. Ruppe wrote:
>> On Thursday, 13 August 2020 at 22:14:15 UTC, H. S. Teoh wrote:
>>> In a nutshell: the exact .stringof of certain function 
>>> symbols changes depending on which overload was processed 
>>> first.
>> 
>> wait why the heck is it using .stringof at all? This inside 
>> dmd itself? I know it uses mangle toChars in places but the 
>> stringof thing should be for user diagnostics only, no 
>> internal use.
>> 
> What is the correct way to get a string representation of a 
> type if not T.stringof? This is inside Phobos, not DMD.
>
> -Steve

"T".

The obvious question is "why do you want a string representation 
of a type"? For debugging? stringof. For later accessing? Find a 
way to make an alias of the type visible at that spot, then use 
the alias's name.


More information about the Digitalmars-d mailing list