summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/types.c b/types.c
index cdc762b..641b922 100644
--- a/types.c
+++ b/types.c
@@ -1164,6 +1164,8 @@ static bool types_expr(Typer *tr, Expression *e) {
}
static bool types_block(Typer *tr, Block *b) {
+ if (b->flags & BLOCK_FLAG_FOUND_TYPES)
+ return true;
bool success = true;
Block *prev_block = tr->block;
tr->block = b;
@@ -1182,6 +1184,7 @@ static bool types_block(Typer *tr, Block *b) {
}
block_exit(b, b->stmts);
tr->block = prev_block;
+ b->flags |= BLOCK_FLAG_FOUND_TYPES;
return success;
}