summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-12-30 20:48:15 -0800
committerOri Bernstein <ori@eigenstate.org>2015-12-30 20:48:15 -0800
commit28a09414d4f8ec3aa8961c079a4fc13081beb34e (patch)
treedcc2b9d45f741f98e5713ac7bf001b7e11058704 /mi
parentb778de26a0bcc80aa49f111b8333511511073634 (diff)
downloadmc-28a09414d4f8ec3aa8961c079a4fc13081beb34e.tar.gz
Don't double-infer nodes.
This was leading to us deciding that variables double declared.
Diffstat (limited to 'mi')
-rw-r--r--mi/fold.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/mi/fold.c b/mi/fold.c
index 0625741..e16b7d3 100644
--- a/mi/fold.c
+++ b/mi/fold.c
@@ -217,7 +217,7 @@ Node *fold(Node *n, int foldvar)
t = tybase(exprtype(args[0]));
/* we only fold lengths right now */
if (t->type == Tyarray && !strcmp(namestr(args[1]), "len")) {
- r = mkexpr(n->loc, Ocast, t->asize);
+ r = t->asize;
r->expr.type = exprtype(n);
}
break;