s->otype = t;
}
+ /* for walk to use in error messages */
+ types[TFUNC] = functype(N, N, N);
+
/* pick up the backend typedefs */
belexinit(LBASETYPE);
if(n->type != T)
goto ret;
- walktype(n->left, Erv);
if(n->left == N)
goto ret;
+
+ walktype(n->left, Erv);
+ convlit(n->left, types[TFUNC]);
+
t = n->left->type;
if(t == T)
goto ret;
if(cr == 1) {
// a,b,... = fn()
walktype(r, Erv);
+ convlit(r, types[TFUNC]);
l = ascompatet(n->op, &n->left, &r->type, 0);
if(l != N)
indir(n, list(r, reorder2(l)));
case OCALLINTER:
case OCALL:
walktype(nr->left, Erv);
+ convlit(nr->left, types[TFUNC]);
t = nr->left->type;
if(t != T && t->etype == tptr)
t = t->type;
=========== bugs/bug122.go
BUG: compilation succeeds incorrectly
-=========== bugs/bug123.go
-BUG: errchk: command succeeded unexpectedly: 6g bugs/bug123.go
-
=========== bugs/bug125.go
BUG: errchk: command succeeded unexpectedly: 6g bugs/bug125.go