http://d.puremagic.com/issues/show_bug.cgi?id=4375
--- Comment #17 from bearophile_h...@eml.cc 2011-08-03 18:59:30 PDT --- I've being hit by a "dangling else" bug in D, traslating this Python code: def foo(sol): global best if is_solution(sol[-1]): if best or len(sol) < len(best): best = list(sol) else: for next in alternatives(sol[-1]): if next not in sol: foo(sol + [next]) to the wrong D code: void foo(Pair[] sol) { if (isSolution(sol[$-1])) if (!best.length || sol.length < best.length) best = sol.dup; else foreach (next; alternatives(sol[$-1])) if (!canFind(sol, next)) foo(sol ~ [next]); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------