Check for structural equality rather than structural-and-cname equality.

This commit is contained in:
Graydon Hoare 2010-11-22 13:22:50 -08:00
parent 6fcf55347e
commit 1090c5e69c

View File

@ -463,7 +463,7 @@ fn unify(&@crate_ctxt ccx, @ty expected, @ty actual) -> unify_result {
// Simple structural type comparison.
fn struct_cmp(@ty expected, @ty actual) -> unify_result {
if (expected == actual) {
if (expected.struct == actual.struct) {
ret ures_ok(expected);
}