parent
2a69db5b76
commit
a4d88dacc9
@ -1943,7 +1943,12 @@ mod unify {
|
||||
alt (struct(cx.tcx, expected)) {
|
||||
case (ty::ty_var(?expected_id)) {
|
||||
auto expected_n = expected_id as uint;
|
||||
union(cx, expected_n, actual_n);
|
||||
alt(union(cx, expected_n, actual_n)) {
|
||||
case (unres_ok) { /* fall through */ }
|
||||
case (unres_err(?t_e)) {
|
||||
ret ures_err(t_e);
|
||||
}
|
||||
}
|
||||
}
|
||||
case (_) {
|
||||
|
||||
|
9
src/test/compile-fail/binop-typeck.rs
Normal file
9
src/test/compile-fail/binop-typeck.rs
Normal file
@ -0,0 +1,9 @@
|
||||
// xfail-stage0
|
||||
// error-pattern:mismatched types
|
||||
// issue #500
|
||||
|
||||
fn main() {
|
||||
auto x = true;
|
||||
auto y = 1;
|
||||
auto z = x + y;
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user