summaryrefslogtreecommitdiff
path: root/types.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2019-10-30 19:47:31 -0400
committerLeo Tenenbaum <pommicket@gmail.com>2019-10-30 19:47:31 -0400
commit7f15c97521f48dc0df13f69b3312ef68443b8ad9 (patch)
tree1594772783445bb3ae1e77464ef6409f1ae3a9d4 /types.c
parentfd60019b95dd4dbc3d1f61a3f914d80dde248ed1 (diff)
fixed type expressions
Diffstat (limited to 'types.c')
-rw-r--r--types.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/types.c b/types.c
index 5f60845..eb5b0df 100644
--- a/types.c
+++ b/types.c
@@ -1183,6 +1183,11 @@ static bool types_decl(Typer *tr, Declaration *d) {
success = false;
goto ret;
}
+ if (val->type->kind == TYPE_TUPLE) {
+ err_print(d->where, "You can't declare a new type to be a tuple.");
+ success = false;
+ goto ret;
+ }
}
}