summaryrefslogtreecommitdiff
path: root/6
diff options
context:
space:
mode:
authorMichael Forney <mforney@mforney.org>2017-06-30 02:17:48 -0700
committerOri Bernstein <ori@eigenstate.org>2017-06-30 23:15:23 -0700
commit0c7eb9f0d093a78520e5cff889dc3fd9d7f6d4c7 (patch)
treeb4ac5ede1f9d47f20e384efb691f30899df0e3dd /6
parent09a34baac6757c7a4c33e3e3c50054acbb1b70bb (diff)
downloadmc-0c7eb9f0d093a78520e5cff889dc3fd9d7f6d4c7.tar.gz
Support union constants
Diffstat (limited to '6')
-rw-r--r--6/simp.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/6/simp.c b/6/simp.c
index 3e5213e..400b6bc 100644
--- a/6/simp.c
+++ b/6/simp.c
@@ -1424,6 +1424,10 @@ static void extractsub(Simp *s, Node *e)
for (i = 0; i < e->expr.nargs; i++)
extractsub(s, e->expr.args[i]);
break;
+ case Oucon:
+ if (e->expr.nargs == 2)
+ extractsub(s, e->expr.args[1]);
+ break;
default:
break;
}
@@ -1447,6 +1451,7 @@ static void simpconstinit(Simp *s, Node *dcl)
case Oarr:
case Ostruct:
case Oslice:
+ case Oucon:
extractsub(s, e);
lappend(&s->blobs, &s->nblobs, dcl);
break;