summaryrefslogtreecommitdiff
path: root/mi
diff options
context:
space:
mode:
Diffstat (limited to 'mi')
-rw-r--r--mi/match.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/mi/match.c b/mi/match.c
index bfca0a6..deac3e6 100644
--- a/mi/match.c
+++ b/mi/match.c
@@ -165,7 +165,7 @@ static size_t nconstructors(Type *t)
t = tybase(t);
switch (t->type) {
- case Tyvoid: return 0; break;
+ case Tyvoid: return 1; break;
case Tybool: return 2; break;
case Tychar: return 0x10ffff; break;
@@ -338,6 +338,9 @@ 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:
lappend(&last, &nlast, accept);
break;