ref: 28fd8a46376eef8895573949da7cac6fbe6775c5
parent: f46267a4c5ff0c4c143ab5179b399c4aeca3d5c1
author: Ori Bernstein <[email protected]>
date: Thu Dec 18 18:39:02 EST 2014
Fix type equality/hashing for unresolved types.
--- a/parse/type.c
+++ b/parse/type.c
@@ -638,6 +638,7 @@
case Tyvar: hash = inthash(t->tid); break;
case Tyunion: hash = inthash(t->tid); break;
case Tystruct: hash = inthash(t->tid); break;
+ case Tyname: hash = namehash(t->name); break;
default: hash = inthash(t->type); break;
}
@@ -691,6 +692,9 @@
if (a->tid != b->tid)
return 0;
break;
+ case Tyunres:
+ if (!nameeq(a->name, b->name))
+ return 0;
case Tyunion:
for (i = 0; i < a->nmemb; i++) {
if (!nameeq(a->udecls[i]->name, b->udecls[i]->name))