http://d.puremagic.com/issues/show_bug.cgi?id=6280
Summary: [CTFE] Cannot put 'in' expression of AA in an 'if' condition Product: D Version: D2 Platform: Other OS/Version: All Status: NEW Keywords: rejects-valid Severity: normal Priority: P2 Component: DMD AssignedTo: nob...@puremagic.com ReportedBy: kenn...@gmail.com --- Comment #0 from kenn...@gmail.com 2011-07-10 04:16:22 PDT --- Test case: -------------------------------- static assert({ if (0 in [0:0]) {} return true; }()); -------------------------------- x.d(4): Error: cannot evaluate delegate pure nothrow bool() { if (0 in [0:0]) { } return true; } () at compile time x.d(1): Error: static assert (delegate pure nothrow bool() { if (0 in [0:0]) { } return true; } ()) is not evaluatable at compile time -------------------------------- Calling 'if((a in b) !is null)' can workaround the problem. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------