diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-23 00:30:12 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-23 00:30:12 +0000 |
| commit | 6e425a9de8c003b5a733621a6b6730ec3cc902b8 (patch) | |
| tree | 314123bcab78ff295f38f85f31dc141e5fe22d15 /limbo/typecheck.c | |
| parent | 74a4d8c26dd3c1e9febcb717cfd6cb6512991a7a (diff) | |
20061220
Diffstat (limited to 'limbo/typecheck.c')
| -rw-r--r-- | limbo/typecheck.c | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/limbo/typecheck.c b/limbo/typecheck.c index 827aa1e1..0fcfbf4b 100644 --- a/limbo/typecheck.c +++ b/limbo/typecheck.c @@ -2406,7 +2406,7 @@ argcompat(Node *n, Decl *f, Node *a) /* * fn is Odot(adt, methid) * pass adt implicitly if needed - * if not, any side effect of adt will be ingored + * if not, any side effect of adt will be ignored */ Node* passimplicit(Node *fn, Node *args) @@ -2415,12 +2415,12 @@ passimplicit(Node *fn, Node *args) Type *t; t = fn->ty; + n = fn->left; if(t->ids == nil || !t->ids->implicit){ - if(hasside(fn->left, 1)) - nwarn(fn, "result of expression %V ignored", fn->left); + if(!isfnrefty(t) && hasside(n, 1)) + nwarn(fn, "result of expression %V ignored", n); return args; } - n = fn->left; if(n->op == Oname && n->decl->store == Dtype){ nerror(n, "%V is a type and cannot be a self argument", n); n = mkn(Onothing, nil, nil); |
