ref: 3ff9e5e0a03fa26113c7968878ac248f0e3464ef
parent: 41e2a4f9b568b784c97b285c908409d8879a42a4
author: Ori Bernstein <ori@eigenstate.org>
date: Tue Feb 14 18:35:39 EST 2017
Fold Oudata.
--- a/parse/fold.c
+++ b/parse/fold.c
@@ -142,6 +142,11 @@
uc = finducon(tybase(exprtype(args[0])), args[0]->expr.args[0]);
r = val(n->loc, uc->id, exprtype(n));
break;
+ case Oudata:
+ if (exprop(args[0]) != Oucon || args[0]->expr.nargs != 2)
+ break;
+ r = args[0]->expr.args[1];
+ break;
case Ovar:
if (foldvar && issmallconst(decls[n->expr.did]))
r = fold(decls[n->expr.did]->decl.init, foldvar);