summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/types.c b/types.c
index 73c0da0..c2b5437 100644
--- a/types.c
+++ b/types.c
@@ -2395,6 +2395,7 @@ static bool types_decl(Typer *tr, Declaration *d) {
}
static bool types_stmt(Typer *tr, Statement *s) {
+ if (s->flags & STMT_TYPED) return true;
switch (s->kind) {
case STMT_EXPR:
if (!types_expr(tr, &s->expr)) {
@@ -2472,6 +2473,7 @@ static bool types_stmt(Typer *tr, Statement *s) {
}
} break;
}
+ s->flags |= STMT_TYPED;
return true;
}