aboutsummaryrefslogtreecommitdiff
path: root/bootstrap/parse.c
diff options
context:
space:
mode:
Diffstat (limited to 'bootstrap/parse.c')
-rw-r--r--bootstrap/parse.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/bootstrap/parse.c b/bootstrap/parse.c
index 371289f..91c7567 100644
--- a/bootstrap/parse.c
+++ b/bootstrap/parse.c
@@ -1644,7 +1644,10 @@ pexprefix(struct parser *P) {
ex = pexprefix(P);
from = ex.ty;
- if (typeof2(to, from)) ;
+ if (to->t == TYarr && to->length < 0 && ex.t == Eini) {
+ ex.ty = to = mkarraytype(to->child, ex.ini.maxn + 1);
+ }
+ else if (typeof2(to, from)) ;
else if (to->t == TYint && from->t == TYptr && to->size == from->size) ;
else if (from->t == TYint && to->t == TYptr && to->size == from->size) ;
else if (from->t == TYptr && to->t == TYptr) ;