summaryrefslogtreecommitdiff
path: root/6/simp.c
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-12-16 22:45:25 -0800
committerOri Bernstein <ori@eigenstate.org>2015-12-16 22:45:25 -0800
commit393d51ef77ae250ca5552ef985b14c790483ee24 (patch)
treea4f7177f84e3b6469715685a3f9acc2c21763428 /6/simp.c
parentf9b54e1fcf403c9c8386133f1482b2fc315e8ae1 (diff)
downloadmc-393d51ef77ae250ca5552ef985b14c790483ee24.tar.gz
Mark vararg args as reflected correctly.
Diffstat (limited to '6/simp.c')
-rw-r--r--6/simp.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/6/simp.c b/6/simp.c
index b864c2a..273baae 100644
--- a/6/simp.c
+++ b/6/simp.c
@@ -1198,8 +1198,10 @@ static Node *vatypeinfo(Simp *s, Node *n)
* We want to start at variadic, so we want
* to count from ft->nsub - 1, up to n->expr.nsub.
*/
- for (i = ft->nsub - 1; i < n->expr.nargs; i++)
+ for (i = ft->nsub - 1; i < n->expr.nargs; i++) {
+ exprtype(n->expr.args[i])->isreflect = 1;
lappend(&st, &nst, exprtype(n->expr.args[i]));
+ }
vt = mktytuple(n->loc, st, nst);
vt->isreflect = 1;