about summary refs log tree commit diff
path: root/src/comp
diff options
context:
space:
mode:
Diffstat (limited to 'src/comp')
-rw-r--r--src/comp/middle/ty.rs7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/comp/middle/ty.rs b/src/comp/middle/ty.rs
index c8050eb1bc9..deaf925f0b8 100644
--- a/src/comp/middle/ty.rs
+++ b/src/comp/middle/ty.rs
@@ -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 (_) {