thorin
thorin copied to clipboard
Assertion `!pred->arg(index) && "already set"'
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);
}
}
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.