summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
authorOri Bernstein <ori@eigenstate.org>2015-12-15 02:03:29 -0800
committerOri Bernstein <ori@eigenstate.org>2015-12-15 02:03:29 -0800
commit859d8c8282bff77c84a73ab61d55c3532e667590 (patch)
tree45b978b454e3efd1a0820395d77a79639b45b3c5 /mi
parenta46d3858ca1b5dec53cb1f18af34d6d215d0a542 (diff)
downloadmc-859d8c8282bff77c84a73ab61d55c3532e667590.tar.gz
Fix wildcards for void.
Void acts like a primitive here.
Diffstat (limited to 'mi')
-rw-r--r--mi/match.c6
1 files changed, 2 insertions, 4 deletions
diff --git a/mi/match.c b/mi/match.c
index deac3e6..f06d4f3 100644
--- a/mi/match.c
+++ b/mi/match.c
@@ -256,7 +256,7 @@ static int addwildrec(Srcloc loc, Type *ty, Dtree *start, Dtree *accept, Dtree *
tail = NULL;
ntail = 0;
ty = tybase(ty);
- if (istyprimitive(ty)) {
+ if (istyprimitive(ty) || ty->type == Tyvoid) {
for (i = 0; i < start->nnext; i++)
lappend(end, nend, start->next[i]);
if (start->any) {
@@ -338,10 +338,8 @@ static int addwildrec(Srcloc loc, Type *ty, Dtree *start, Dtree *accept, Dtree *
ret = acceptall(start, accept);
lappend(&last, &nlast, accept);
break;
- case Tyvoid:
- ret = 1;
- break;
default:
+ ret = 1;
lappend(&last, &nlast, accept);
break;
}