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



--- Comment #4 from [email protected] 2013-02-22 07:54:25 PST ---
(In reply to comment #3)
> > What do you mean "only the class one works"? I'm getting a failure for both
> > asserts.
> 
> I am not with DMD 2.062. This code compiles without any error and prints 
> "int":
> 
> > This worked in 2.060, but was fixed starting in 2.061.

My bad, I must have botched the test. That does indeed work in 2.061, so was
broken in 2.062.

> > Try something like this:
> > 
> > template ElemTypeOf( T )
> > {
> >     static private T t = T.init;
> >     alias typeof(t[0]) ElemTypeOf;
> > }
> 
> I guess that works (with some simplification of course), although the 
> existence
> of a workaround does not negate the existence of the regression.

Well, as I said, I think this is not a matter of regression and workaround, but
rather wrong code finally getting rejected, and new and correct code being
deployed to replace it.

In any case, I'll let one of the more compiler knowledgeable guys (Kenji?
Walter) give you definitive answer.

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

Reply via email to