--- Comment #17 from 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)
        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;
        foreach (next; alternatives(sol[$-1]))
            if (!canFind(sol, next))
                foo(sol ~ [next]);

Configure issuemail:
------- You are receiving this mail because: -------

Reply via email to