ref: 4f6e605e85a3b670e8c755cc2dbe08c4db1c1b35
parent: 961b6524f4e87570495b1c3eece15104ca61f22e
author: Ori Bernstein <[email protected]>
date: Thu Dec 18 09:57:34 EST 2014
Actually check subtypes in structs.
--- a/parse/type.c
+++ b/parse/type.c
@@ -692,14 +692,20 @@
return 0;
break;
case Tyunion:
- for (i = 0; i < a->nmemb; i++)
+ for (i = 0; i < a->nmemb; i++) {
+ if (!nameeq(a->udecls[i]->name, b->udecls[i]->name))
+ return 0;
if (!tyeq(a->udecls[i]->etype, b->udecls[i]->etype))
return 0;
+ }
break;
case Tystruct:
- for (i = 0; i < a->nmemb; i++)
+ for (i = 0; i < a->nmemb; i++) {
if (strcmp(declname(a->sdecls[i]), declname(b->sdecls[i])) != 0)
return 0;
+ if (!tyeq(decltype(a->sdecls[i]), decltype(b->sdecls[i])))
+ return 0;
+ }
break;
case Tyname:
if (!nameeq(a->name, b->name))