From ffe049371a64e0b41fdc777106f768b16b2cd9b2 Mon Sep 17 00:00:00 2001 From: A404M Date: Sat, 24 May 2025 02:36:58 +0330 Subject: fix some unintended stuff --- src/compiler/ast-tree.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/compiler') diff --git a/src/compiler/ast-tree.c b/src/compiler/ast-tree.c index 628784a..a4159d1 100644 --- a/src/compiler/ast-tree.c +++ b/src/compiler/ast-tree.c @@ -5842,7 +5842,7 @@ bool setTypesIf(AstTree *tree, AstTreeSetTypesHelper helper, return false; } - if (isConst(metadata->condition)) { + if (metadata->condition->token == AST_TREE_TOKEN_KEYWORD_COMPTIME) { AstTree *condition = getValue(metadata->condition, true); AstTree *result; bool condi = *(AstTreeBool *)condition->metadata; @@ -5913,7 +5913,7 @@ bool setTypesWhile(AstTree *tree, AstTreeSetTypesHelper _helper, return false; } - if (isConst(metadata->condition)) { + if (metadata->condition->token == AST_TREE_TOKEN_KEYWORD_COMPTIME) { AstTree *condition = getValue(metadata->condition, true); bool condi = *(AstTreeBool *)condition->metadata; astTreeDelete(condition); -- cgit v1.2.3