diff options
| author | Graydon Hoare <[email protected]> | 2010-11-22 13:22:50 -0800 |
|---|---|---|
| committer | Graydon Hoare <[email protected]> | 2010-11-22 13:24:53 -0800 |
| commit | 1090c5e69cc10f8d7e57c4790461046de068f7aa (patch) | |
| tree | b413a97270f62a7bf7849d22d7be56defbdbc797 /src/comp | |
| parent | Resolve the easy case of type paths. (diff) | |
| download | rust-1090c5e69cc10f8d7e57c4790461046de068f7aa.tar.xz rust-1090c5e69cc10f8d7e57c4790461046de068f7aa.zip | |
Check for structural equality rather than structural-and-cname equality.
Diffstat (limited to 'src/comp')
| -rw-r--r-- | src/comp/middle/typeck.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/comp/middle/typeck.rs b/src/comp/middle/typeck.rs index 55a43acb..e6c7a9da 100644 --- a/src/comp/middle/typeck.rs +++ b/src/comp/middle/typeck.rs @@ -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); } |