summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-03-01 12:21:50 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-03-01 12:21:50 -0500
commit88e7c92e76ce771e7a1efd4824060e3905194070 (patch)
tree04b36c981e662cb2c4a4db364dc36b3e8dd7164a /types.c
parentda748748c0239c21b9d62c77b51e269ad1d7de9f (diff)
casting to #C types
Diffstat (limited to 'types.c')
-rw-r--r--types.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/types.c b/types.c
index 722fbc3..7b323b0 100644
--- a/types.c
+++ b/types.c
@@ -2845,8 +2845,10 @@ static Status types_stmt(Typer *tr, Statement *s) {
}
}
if (tr->block == NULL) {
- if (!eval_stmt(tr->evalr, s))
- return false;
+ if (s->expr.kind != EXPR_C) {
+ if (!eval_stmt(tr->evalr, s))
+ return false;
+ }
}
break;
case STMT_DECL: