[Issue 10862] Assignment inside if condition still sometimes accepted

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Aug 20 14:58:06 PDT 2013


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



--- Comment #4 from Andrei Alexandrescu <andrei at erdani.com> 2013-08-20 14:58:03 PDT ---
(In reply to comment #3)
> (In reply to comment #1)
> > Are you saying that
> > 
> > if((a = b) == 0)
> > 
> > should be disallowed or just
> > 
> > if((a = b) = 0)
> 
> Only the latter. It fits the pattern "if (expr1 = expr2)".

(...and there should be a space after "if". In fact, the compiler should
enforce it :o).)

-- 
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