Skip to content

Commit ebdb039

Browse files
committed
---
yaml --- r: 1262 b: refs/heads/master c: 9cc00d5 h: refs/heads/master v: v3
1 parent 42d03f1 commit ebdb039

File tree

2 files changed

+14
-2
lines changed

2 files changed

+14
-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: 41b7d6d74da54b80419ab093303dd356fae957ec
2+
refs/heads/master: 9cc00d5f6cc85a825e79e29324261daa17e50048

trunk/src/comp/middle/ty.rs

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -889,7 +889,19 @@ fn unify(@ty.t expected, @ty.t actual, &unify_handler handler)
889889
ret result;
890890
}
891891
case (ty.ty_param(?actual_id)) {
892-
ret handler.unify_actual_param(actual_id, expected, actual);
892+
alt (expected.struct) {
893+
894+
// These two unify via logic lower down. Fall through.
895+
case (ty.ty_local(_)) { }
896+
case (ty.ty_var(_)) { }
897+
898+
// More-concrete types can unify against params here.
899+
case (_) {
900+
ret handler.unify_actual_param(actual_id,
901+
expected,
902+
actual);
903+
}
904+
}
893905
}
894906
case (_) { /* empty */ }
895907
}

0 commit comments

Comments
 (0)