summaryrefslogtreecommitdiff
path: root/parse/infer.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2018-01-02 23:19:38 -0800
committerOri Bernstein <ori@eigenstate.org>2018-01-11 22:16:11 -0800
commit2809ae93520d9f0444f6c6f3c51db3ef65602b4b (patch)
tree1e24da2788d86a48ff9f2a41666d6f676edd5af9 /parse/infer.c
parent9424339d8d453f5c559edd5d23549d662d1c9d8d (diff)
downloadmc-2809ae93520d9f0444f6c6f3c51db3ef65602b4b.tar.gz
Get closer to typechecking generic args correctly.
Diffstat (limited to 'parse/infer.c')
-rw-r--r--parse/infer.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/parse/infer.c b/parse/infer.c
index 24f5f88..a98db2b 100644
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -638,7 +638,9 @@ tf(Type *orig)
t = tylookup(orig);
isgeneric = t->type == Tygeneric;
ingeneric += isgeneric;
+ pushenv(orig->env);
tyresolve(t);
+ popenv(orig->env);
/* If this is an instantiation of a generic type, we want the params to
* match the instantiation */
if (orig->type == Tyunres && t->type == Tygeneric) {