[Issue 2841] char[] template value arguments broken in D2

2009-04-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2841


clugd...@yahoo.com.au changed:

   What|Removed |Added

   Severity|regression  |major
   Keywords|rejects-valid   |spec




--- Comment #2 from clugd...@yahoo.com.au  2009-04-16 10:48 ---
(In reply to comment #1)
> Um,
> 
> string literals are invariant(char)[].

Indeed.

> The error message sure sucks, but it's not surprising that this doesn't work.

But there is no way that a mutable char [] could be passed as a template value
parameter. And it's not a type. So what is
template(char[] X) ?

int foo(char[] c)() { return 0; }

void main(){
   char [] z;
   int a = foo!(z)(); // ok
}

I can't see anything in the spec to indicate what this means. From the
.mangleof, it seems to be accepting it as an alias parameter.

OK, I'll change this to a spec error.


-- 



[Issue 2841] char[] template value arguments broken in D2

2009-04-16 Thread d-bugmail
http://d.puremagic.com/issues/show_bug.cgi?id=2841





--- Comment #1 from jarrett.billings...@gmail.com  2009-04-16 10:05 ---
Um,

string literals are invariant(char)[].

The error message sure sucks, but it's not surprising that this doesn't work.


--