diff options
author | Ori Bernstein <ori@eigenstate.org> | 2015-12-15 02:03:29 -0800 |
---|---|---|
committer | Ori Bernstein <ori@eigenstate.org> | 2015-12-15 02:03:29 -0800 |
commit | 859d8c8282bff77c84a73ab61d55c3532e667590 (patch) | |
tree | 45b978b454e3efd1a0820395d77a79639b45b3c5 /mi | |
parent | a46d3858ca1b5dec53cb1f18af34d6d215d0a542 (diff) | |
download | mc-859d8c8282bff77c84a73ab61d55c3532e667590.tar.gz |
Fix wildcards for void.
Void acts like a primitive here.
Diffstat (limited to 'mi')
-rw-r--r-- | mi/match.c | 6 |
1 files changed, 2 insertions, 4 deletions
@@ -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; } |