summaryrefslogtreecommitdiff
path: root/mi/match.c
diff options
context:
space:
mode:
Diffstat (limited to 'mi/match.c')
-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;
}