DMD 1.033 (typeof() error instantiating in template)

David L. Davis SpottedTiger at yahoo.com
Thu Jul 17 10:06:03 PDT 2008


Koroskin Denis Wrote:

> On Thu, 17 Jul 2008 20:20:48 +0400, David L. Davis  
> <SpottedTiger at yahoo.com> wrote:
> 
> > Koroskin Denis Wrote:
> >> typeof(T2) doesn't work anymore. Try replacing with T2.
> >> BTW, error message is pretty clear and shows correct line number.
> >>
> >> typeof(T2) v2; // Error: argument ulong to typeof is not an expression
> >>
> >> Next time post to digitalmars.D or digitalmars.D.learn, please!
> >
> > Thxs for the reply...btw I'm not new here...I know all about noob  
> > questions must go to learn. This is an issue with the existing D v1.xxx  
> > compiler changing things, which is what I'm pointing out to Walter.  
> > Plus, maybe the message makes perfect sense to you...but it doesn't to  
> > me. Could you please reframe from hammering down on people in the  
> > future...to me you're the new kid on the block. :)
> >
> > David L. Davis
> 
> Sorry for that, no offense was intended.

No Problem. 

And thanks again, you're suggestion of using "T2 v2" in place of "typeof(T2) v2" does fix the issue in my aging D v1.xxx code. (In fact it makes a lot more sense that it should work this way, but the fact still remains that it does break any of the existing D v1.xxx code written the other way). But I'll leave that up Walter to decide if the risk to existing D v1.xxx code is very low as to whether he'll leave the valid D v1.xxxx statement "typeof(T2) v2" as an error, or to fix it. If he decides to fix it, then I'll put in a bug report, otherwise I'll just change my code, and continue testing this code against the future D v1.xxx releases (just trying do my small part in moving D forward).

David L. Davis


More information about the Digitalmars-d-announce mailing list