Thread overview
[ ] isn't parsed correctly from a template char[] argument
Jan 12, 2006
Don Clugston
Jan 12, 2006
Chris Lajoie
Jan 15, 2006
Thomas Kuehne
January 12, 2006
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");
January 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.
January 15, 2006
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