[Issue 6408] string[].init gives a wrong type

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Jan 16 16:35:16 PST 2013


http://d.puremagic.com/issues/show_bug.cgi?id=6408



--- Comment #8 from yebblies <yebblies at gmail.com> 2013-01-17 11:35:14 EST ---
(In reply to comment #7)
> (In reply to comment #6)
> 
> > I'm not sure T* can be done like this, but it also produces an error instead of
> > being ignored silently.
> 
> Thank you.
> In the unittests have you added a test case that shows such error message?

For:

auto x = string*.init;

You get:

testx.d(3): Error: undefined identifier 'init'

Because it is parsed as (string) * (.init).  To me it is much more clear that
string*.init is invalid code compared to string[].init.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------


More information about the Digitalmars-d-bugs mailing list