summaryrefslogtreecommitdiff
path: root/parse
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-03-28 23:13:04 -0700
committerOri Bernstein <ori@eigenstate.org>2015-03-28 23:13:04 -0700
commit6dadda8b1211ff0ef20c577fab4b70157c718e96 (patch)
treeed6cd3a0ba427cb556729713927990c18d76428a /parse
parent050764f5709e80b17c783ab92327618fdcce3e40 (diff)
downloadmc-6dadda8b1211ff0ef20c577fab4b70157c718e96.tar.gz
Tweak the ABI for type information.
Diffstat (limited to 'parse')
-rw-r--r--parse/infer.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/parse/infer.c b/parse/infer.c
index 217174f..3d7ef4a 100644
--- a/parse/infer.c
+++ b/parse/infer.c
@@ -894,6 +894,8 @@ static Type *unify(Inferstate *st, Node *ctx, Type *u, Type *v)
typeerror(st, a, b, ctx, NULL);
}
mergetraits(st, ctx, a, b);
+ if (a->isreflect || b->isreflect)
+ r->isreflect = a->isreflect = b->isreflect = 1;
membunify(st, ctx, a, b);
/* if we have delayed types for a tyvar, transfer it over. */
@@ -2174,7 +2176,7 @@ void tagexports(Stab *st, int hidelocal)
k = htkeys(st->ty, &n);
for (i = 0; i < n; i++) {
t = gettype(st, k[i]);
- if (t->vis != Visexport)
+ if (!t->isreflect && t->vis != Visexport)
continue;
if (hidelocal && t->ispkglocal)
t->vis = Vishidden;