Bug in D?!
    Mr. Pib via Digitalmars-d-learn 
    digitalmars-d-learn at puremagic.com
       
    Thu Aug 10 21:02:49 PDT 2017
    
    
  
string Q(alias T, alias D)()
{
	pragma(msg, T);
	pragma(msg, D);
	enum x = T~" = "~D~";";
	pragma(msg, x);
}
mixin(Q!(`x`, 100)());
outputs, at compile time,
x
100
x = d;
there is no lowercase d. I did initially define Q as
string Q(alias T, D)(D d)
and one might think it is remnants left over from I cleaned the 
project so it shouldn't be happening. Seems like a bug.
(I realized that I'd probably only ever pass compile time values)
Of course, using D.stringof gives the value.
The problem is the case of D.
    
    
More information about the Digitalmars-d-learn
mailing list