aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/compile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compile.c b/src/compile.c
index 8658c057..20afec7a 100644
--- a/src/compile.c
+++ b/src/compile.c
@@ -2041,6 +2041,8 @@ CORD compile_typed_array(env_t *env, ast_t *ast, type_t *array_type)
{
env_t *scope = item_type->tag == EnumType ? with_enum_scope(env, item_type) : env;
+ if (is_incomplete_type(item_type))
+ code_err(ast, "This array's type can't be inferred!");
CORD code = CORD_all("TypedArrayN(", compile_type(item_type), CORD_asprintf(", %ld", n));
for (ast_list_t *item = array->items; item; item = item->next) {
code = CORD_all(code, ", ", compile_to_type(scope, item->ast, item_type));