digitalmars.D.bugs - alias and template
- Derek Parnell (14/14) Nov 24 2005 This will not compile if the commented line is uncommented.
- Ivan Senji (2/15) Nov 24 2005
- Derek Parnell (7/23) Nov 25 2005 Thanks. This is not obvious so it should be documented officially. Plus ...
- Ivan Senji (5/8) Nov 25 2005 No it isn't. I don't think that there is anyone who didn't make that
- Don Clugston (5/17) Nov 25 2005 and the odd thing is, it doesn't seem to be necessary for that example!
- Georg Wrede (3/7) Nov 25 2005 Between .138 and .140, I'd take whatever .140 does as the Canonical out
This will not compile if the commented line is uncommented. ========================= class Foo(T) { void Bar( Foo!(int) a) {} } //alias Foo!(real) dFoo; // Must be a comment to compile. ======================== Is this a bug or am I missing something? -- Derek (skype: derek.j.parnell) Melbourne, Australia 25/11/2005 5:10:07 PM
Nov 24 2005
Derek Parnell wrote:This will not compile if the commented line is uncommented. ========================= class Foo(T) { void Bar( Foo!(int) a) {}Should be void Bar( .Foo!(int) a) {}} //alias Foo!(real) dFoo; // Must be a comment to compile. ======================== Is this a bug or am I missing something?
Nov 24 2005
On Fri, 25 Nov 2005 07:30:26 +0100, Ivan Senji wrote:Derek Parnell wrote:Thanks. This is not obvious so it should be documented officially. Plus the reason for it too, 'cos I'm still not sure why. But it works now. -- Derek Parnell Melbourne, Australia 25/11/2005 8:33:51 PMThis will not compile if the commented line is uncommented. ========================= class Foo(T) { void Bar( Foo!(int) a) {}Should be void Bar( .Foo!(int) a) {}} //alias Foo!(real) dFoo; // Must be a comment to compile. ======================== Is this a bug or am I missing something?
Nov 25 2005
Derek Parnell wrote:Thanks. This is not obvious so it should be documented officially. Plus the reason for it too, 'cos I'm still not sure why. But it works now.No it isn't. I don't think that there is anyone who didn't make that mistake. The thing is it is ind the documentation in http://www.digitalmars.com/d/template.html, where it says that templates have their own scope + in that recursive templates example.
Nov 25 2005
Ivan Senji wrote:Derek Parnell wrote:and the odd thing is, it doesn't seem to be necessary for that example! At least, in DMD 0.138, it worked if you left out the dot. Seems to be necessary again in DMD 0.140, where the behaviour is much more predictable.Thanks. This is not obvious so it should be documented officially. Plus the reason for it too, 'cos I'm still not sure why. But it works now.No it isn't. I don't think that there is anyone who didn't make that mistake. The thing is it is ind the documentation in http://www.digitalmars.com/d/template.html, where it says that templates have their own scope + in that recursive templates example.
Nov 25 2005
Don Clugston wrote:and the odd thing is, it doesn't seem to be necessary for that example! At least, in DMD 0.138, it worked if you left out the dot. Seems to be necessary again in DMD 0.140, where the behaviour is much more predictable.Between .138 and .140, I'd take whatever .140 does as the Canonical out of those two.
Nov 25 2005