swap flag from const to comptime
authorJudah Caruso <judahrcr@gmail.com>
Fri, 8 Dec 2023 02:32:47 +0000 (02:32 +0000)
committerJudah Caruso <judahrcr@gmail.com>
Fri, 8 Dec 2023 02:32:47 +0000 (02:32 +0000)
compiler/src/types.c

index ee5ed9695cb9f64e965b947441ce9f6f4b4ad202..805f7102405b254c06eb704a28cba8137e065bde 100644 (file)
@@ -382,7 +382,7 @@ static Type* type_build_from_ast_inner(bh_allocator alloc, AstType* type_node, b
                 count = get_expression_integer_value(a_node->count_expr, &valid);
 
                 if (!valid) {
-                    if (!(a_node->count_expr->flags & Ast_Flag_Const)) {
+                    if (!(a_node->count_expr->flags & Ast_Flag_Comptime)) {
                         onyx_report_error(a_node->token->pos, Error_Critical, "Array type size must be a constant.");
                     }
                     else {