summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2019-02-09 21:48:50 -0800
committerOri Bernstein <ori@eigenstate.org>2019-02-10 22:40:17 -0800
commit32abfabfaf95942558a590a307432b499f392ea9 (patch)
treec7cf186ab69377bed5dfceb915f94bb66067ea8e
parent905f4d10a78e7e2f6eb849cf373b14cd78c87d73 (diff)
downloadmc-32abfabfaf95942558a590a307432b499f392ea9.tar.gz
Work towards removing the streq check.
-rw-r--r--parse/infer.c17
1 files changed, 11 insertions, 6 deletions
diff --git a/parse/infer.c b/parse/infer.c
index 35146ec..e0e023c 100644
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -2735,14 +2735,19 @@ typesub(Node *n, int noerr)
settype(n, tyfix(n, type(n), 0));
switch (n->lit.littype) {
case Lfunc: typesub(n->lit.fnval, noerr); break;
- case Lint: checkrange(n);
- default: break;
+ case Lint: checkrange(n); break;
+ default: break;
}
break;
- case Nimpl: putimpl(curstab(), n);
- case Nname:
- case Nuse: break;
- case Nnone: die("Nnone should not be seen as node type!"); break;
+ case Nimpl:
+ pushenv(n->impl.env);
+ putimpl(curstab(), n);
+ popenv(n->impl.env);
+ case Nname: case Nuse:
+ break;
+ case Nnone:
+ die("Nnone should not be seen as node type!");
+ break;
}
}