summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
Diffstat (limited to 'types.c')
-rw-r--r--types.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/types.c b/types.c
index 39de36a..6ae52a9 100644
--- a/types.c
+++ b/types.c
@@ -1102,6 +1102,10 @@ static bool types_stmt(Typer *tr, Statement *s) {
if (!types_expr(tr, &s->expr)) {
return false;
}
+ if (s->expr.type.kind == TYPE_TUPLE) {
+ err_print(s->where, "Statement of a tuple is not allowed. The comma operator does not exist in toc; use a semicolon instead.");
+ return false;
+ }
break;
case STMT_DECL:
if (!types_decl(tr, &s->decl))