EXTERN int exporting;
-EXTERN int func;
-
/*
* y.tab.c
*/
int methconv(Type*);
Sym* signame(Type*);
int eqtype(Type*, Type*, int);
+int eqtypenoname(Type*, Type*);
void argtype(Node*, Type*);
int eqargs(Type*, Type*);
uint32 typehash(Type*, int);
return eqtype(t1->type, t2->type, d+1);
}
+int
+eqtypenoname(Type *t1, Type *t2)
+{
+ if(t1 == T || t2 == T || t1->etype != TSTRUCT || t2->etype != TSTRUCT)
+ return eqtype(t1, t2, 0);
+
+
+ t1 = t1->type;
+ t2 = t2->type;
+ for(;;) {
+ if(!eqtype(t1, t2, 1))
+ return 0;
+ if(t1 == T)
+ return 1;
+ t1 = t1->down;
+ t2 = t2->down;
+ }
+}
+
static int
subtype(Type **stp, Type *t, int d)
{
if(l != T && r != N
&& structnext(&peekl) != T
&& listnext(&peekr) == N
- && eqtype(r->type, *nl, 0))
- return convas(nod(OAS, nodarg(*nl, fp), r));
+ && eqtypenoname(r->type, *nl))
+ return convas(nod(OAS, nodarg(r->type, fp), r));
loop:
if(l != T && isddd(l->type)) {
=========== chan/nonblock.go
PASS
-=========== bugs/bug064.go
-bugs/bug064.go:15: illegal types for operand: CALL
- int
- struct { u int; v int }
-BUG: compilation should succeed
-
=========== bugs/bug085.go
bugs/bug085.go:8: P: undefined
BUG: fails incorrectly