ref: 859d8c8282bff77c84a73ab61d55c3532e667590
parent: a46d3858ca1b5dec53cb1f18af34d6d215d0a542
author: Ori Bernstein <[email protected]>
date: Mon Dec 14 21:03:29 EST 2015
Fix wildcards for void. Void acts like a primitive here.
--- a/mi/match.c
+++ b/mi/match.c
@@ -256,7 +256,7 @@
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 @@
ret = acceptall(start, accept);
lappend(&last, &nlast, accept);
break;
- case Tyvoid:
- ret = 1;
- break;
default:
+ ret = 1;
lappend(&last, &nlast, accept);
break;
}