http://d.puremagic.com/issues/show_bug.cgi?id=5906
--- Comment #10 from [email protected] 2013-03-07 19:25:12 PST --- (In reply to comment #9) > struct S(int a) > { > void fun(int b) in { assert(a != b); } body {} > } > > void main() > { > foreach(i; TypeTuple!(1, 2, 3, 4)) > { > auto s = S!i(); > if (i != 4) > s.fun(4); > } > } > > This code would error 'cannot call S.fun with b == 4' etc even though S.fun > never actually gets called with 4. I see, thank you for the answer. If the pre-condition analysis (constant folding) is done after a normal step of dead branch removal, then maybe that error will not be shown. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
