Closed
Description
Example with a matching names in a single record:
fn main()
{
let pt = {x: 1, y: 2};
let _x = alt pt {
{x, x} { x }
};
}
Example with two records:
fn main()
{
let pt = {x: 1, y: 2};
let pt2 = {x: 1, y: 2};
let _x = alt (pt, pt2) {
({x, y}, {x, y}) { x }
};
}
Example with a tuple:
fn main()
{
let _z = alt (1, 2) {
(x, x) { x }
};
}
All give me:
rust: task failed at 'Assertion cx.fcx.lllocals.contains_key(nid) failed', /Users/jruderman/code/rust/src/rustc/middle/trans/base.rs:2438
The Rust compiler should catch this before it gets to LLVM.