thorin icon indicating copy to clipboard operation
thorin copied to clipboard

Assertion `!pred->arg(index) && "already set"'

Open madmann91 opened this issue 8 years ago • 1 comments

The following code triggers the assertion (using impala and -emit-thorin):

struct Blob {
    done: fn () -> bool
}

fn test(next_blob: Blob) -> () {
    let next = |exit| {
        next_blob
    };

    let mut blob : Blob;
    while !blob.done() {
        blob = next(continue);
    }
}

madmann91 avatar Feb 22 '17 14:02 madmann91

The problem ist that the continue continuation is passed as argument to next. Impala's emit doesn't handle this at the moment.

So actually, it's a bug in Impala.

leissa avatar Feb 22 '17 15:02 leissa