Skip to content

Commit 01f0cbf

Browse files
committed
---
yaml --- r: 3199 b: refs/heads/master c: a4d88da h: refs/heads/master i: 3197: 0b3c30d 3195: ebe5550 3191: 7ffce30 3183: fd7c202 3167: 00683a1 3135: 9f7c8cf 3071: fa4a634 v: v3
1 parent 7526fa8 commit 01f0cbf

File tree

3 files changed

+16
-2
lines changed

3 files changed

+16
-2
lines changed

[refs]

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
---
2-
refs/heads/master: 2a69db5b769957c7deb89868d626b31f6e502757
2+
refs/heads/master: a4d88dacc9dd70547ece3dcc65fbc61a8fcfa91d

trunk/src/comp/middle/ty.rs

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1943,7 +1943,12 @@ mod unify {
19431943
alt (struct(cx.tcx, expected)) {
19441944
case (ty::ty_var(?expected_id)) {
19451945
auto expected_n = expected_id as uint;
1946-
union(cx, expected_n, actual_n);
1946+
alt(union(cx, expected_n, actual_n)) {
1947+
case (unres_ok) { /* fall through */ }
1948+
case (unres_err(?t_e)) {
1949+
ret ures_err(t_e);
1950+
}
1951+
}
19471952
}
19481953
case (_) {
19491954

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
// xfail-stage0
2+
// error-pattern:mismatched types
3+
// issue #500
4+
5+
fn main() {
6+
auto x = true;
7+
auto y = 1;
8+
auto z = x + y;
9+
}

0 commit comments

Comments
 (0)