graydon/rust — Issue #1400: trans.rs assertion error compiling code
Author: erickt
Created: 2011-12-31 04:47:48+00:00
State: open

I've reduced this down to about bare minimum:

use std;

native mod foo {
fn bar(x: int);
}

obj new(i: int) {
fn f() {
str::as_buf("", {|_x| foo::bar(i) });
}
}

Errors out with:

rust: upcall fail 'Assertion cx.fcx.llobjfields.contains_key(did.node) failed', ../src/comp/middle/trans.rs:2679
rust: domain main @0x102029600 root task failed