digitalmars.D.bugs - [ ] isn't parsed correctly from a template char[] argument
- Don Clugston (15/15) Jan 12 2006 Possibly the same cause as the previous bug, because
- Chris Lajoie (3/22) Jan 12 2006 I've run into this one too, although I didn't think to use an extra set
- Thomas Kuehne (12/27) Jan 15 2006 -----BEGIN PGP SIGNED MESSAGE-----
Possibly the same cause as the previous bug, because it also goes away if you introduce parentheses. Error: fish is used as a type --------------- template whale(char walrus) { const char whale = walrus; } template dolphin(char [] fish) { //const char dolphin = whale!((fish[4])); // OK const char dolphin = whale!(fish[4]); // fails } const char urchin = dolphin!("anenome");
Jan 12 2006
Don Clugston wrote:Possibly the same cause as the previous bug, because it also goes away if you introduce parentheses. Error: fish is used as a type --------------- template whale(char walrus) { const char whale = walrus; } template dolphin(char [] fish) { //const char dolphin = whale!((fish[4])); // OK const char dolphin = whale!(fish[4]); // fails } const char urchin = dolphin!("anenome");I've run into this one too, although I didn't think to use an extra set of parens. Would be nice to see this fixed.
Jan 12 2006
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 Don Clugston schrieb am 2006-01-12:Possibly the same cause as the previous bug, because it also goes away if you introduce parentheses. Error: fish is used as a type --------------- template whale(char walrus) { const char whale = walrus; } template dolphin(char [] fish) { //const char dolphin = whale!((fish[4])); // OK const char dolphin = whale!(fish[4]); // fails } const char urchin = dolphin!("anenome");Added to DStress as http://dstress.kuehne.cn/run/t/template_23_A.d http://dstress.kuehne.cn/run/t/template_23_B.d Thomas -----BEGIN PGP SIGNATURE----- iD8DBQFDyjV13w+/yD4P9tIRAuGfAJ4q0idAtFSS/XiwbguQgFi4hVDNgACdFLXG RmcSwlIWi+JGHy44IYGTsnI= =Wf4x -----END PGP SIGNATURE-----
Jan 15 2006