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



--- Comment #2 from Kenji Hara <k.hara...@gmail.com> 2012-09-15 21:11:12 PDT ---
(In reply to comment #1)
> According to the spec, this code shouldn't compile in the first place, since
> there are multiple types being returned. To quote the spec:
> 
> > If there are mul�ti�ple Re�turn�State�ments, the types of them must match 
> > ex�actly. If there are no Re�turn�State�ments, the re�turn type is 
> > in�ferred to be void.
> 
> So, depending on what's causing the corruption, it doesn't need to be fixed 
> but
> rather the compiler needs to be fixed so that it this example outright fails 
> to
> compile.

But, I have already *fixed* bug 5899. It is getting common type of null and
other reference types. Therefore, now, multiple return statements in auto
function calculates the most derived common type as the actual return type.

So, I think the spec should be improved.
(I think I have to do it...)

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

Reply via email to