ref: e02fa54dc9605611a5a5699c4af83a347a411848
parent: 96da004ab004c908e6e137e3e5407a328b0b42b8
author: Ori Bernstein <[email protected]>
date: Fri Oct 11 07:23:28 EDT 2013
Better comments.
--- a/parse/use.c
+++ b/parse/use.c
@@ -587,6 +587,12 @@
size_t i;
Type *t, *old;
+ /*
+ * merge duplicate definitions.
+ * This allows us to compare named types by id, instead
+ * of doing a deep walk through the type. This ability is
+ * depended on when we do type inference.
+ */
for (i = 0; i < ntypefixdest; i++) {
t = htget(tidmap, (void*)typefixid[i]);
if (t->type == Tyname && !t->issynth) {
@@ -599,7 +605,7 @@
if (!*typefixdest[i])
die("Couldn't find type %d\n", (int)typefixid[i]);
}
- /* check for duplicate type names */
+ /* check for duplicate type definitions */
for (i = 0; i < ntypefixdest; i++) {
t = htget(tidmap, (void*)typefixid[i]);
if (t->type != Tyname || t->issynth)