www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.announce - Re: DMD 1.033 (typeof() error instantiating in template)

reply David L. Davis <SpottedTiger yahoo.com> writes:
Koroskin Denis Wrote:

 On Thu, 17 Jul 2008 20:20:48 +0400, David L. Davis  
 <SpottedTiger 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
Jul 17 2008
parent reply BCS <ao pathlink.com> writes:
Reply to David,

 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
 

His stance is that typeof(Type) is /not/ valid, D1.0 or D2.0.
Jul 17 2008
parent reply David L. Davis <SpottedTiger yahoo.com> writes:
BCS Wrote:

 Reply to David,
 
 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
 

His stance is that typeof(Type) is /not/ valid, D1.0 or D2.0.

David L. Davis
Jul 17 2008
parent reply Bill Baxter <dnewsgroup billbaxter.com> writes:
David L. Davis wrote:
 BCS Wrote:
 
 Reply to David,

 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


David L. Davis

Yes, it was reported as a bug (multiple times?) already. And the bugs were closed as invalid by Walter. Also mentioned on the NG here a few times I think. But you're right, it did break a lot of code. And it's not always easy to tell why. --bb
Jul 17 2008
parent David L. Davis <SpottedTiger yahoo.com> writes:
Bill Baxter Wrote:

 David L. Davis wrote:
 BCS Wrote:
 
 Reply to David,

 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


David L. Davis

Yes, it was reported as a bug (multiple times?) already. And the bugs were closed as invalid by Walter. Also mentioned on the NG here a few times I think. But you're right, it did break a lot of code. And it's not always easy to tell why. --bb

Thanks for the info Bill, I must admit I haven't been following the NG as closely as I did in the past. I do try to scan them at least once a day during the work-week. Also it's nice to see a lot more people posting tho, just wish this NG search ability were better. Thanks again for the reply, David L. Davis
Jul 18 2008