rust/src/test/compile-fail/rec-extend.rs
Brian Anderson 0eac640fdd Swap the expected/actual for typechecking fields of updated records
In 'rec(a = b with c)', if a exists in c then the expected type for b is the
type of c.
2011-07-06 14:04:52 -07:00

10 lines
138 B
Rust

// xfail-stage0
// error-pattern:expected int but found bool
fn main() {
auto a = rec(foo = 0);
auto b = rec(foo = true with a);
}