diff options
| author | 2022-08-20 11:06:38 +0200 | |
|---|---|---|
| committer | 2022-08-20 11:06:38 +0200 | |
| commit | 46e1f128fd310bd29a2b4335b36c60d6cc0aa3a7 (patch) | |
| tree | feb93a69cf93773d0542435ae09c76de04e509c8 /bootstrap/parse.c | |
| parent | df41a4512932f1312e4725d0409757a683b091ed (diff) | |
initial work on IR
Diffstat (limited to 'bootstrap/parse.c')
| -rw-r--r-- | bootstrap/parse.c | 5 |
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) ; |