From 0994f4b187bf8565dc82c062a123858364807528 Mon Sep 17 00:00:00 2001 From: Janis Date: Sun, 22 Dec 2024 19:12:15 +0100 Subject: [PATCH] fix comptime eval --- src/ast2/mod.rs | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/src/ast2/mod.rs b/src/ast2/mod.rs index 4d3723b..0533ca1 100644 --- a/src/ast2/mod.rs +++ b/src/ast2/mod.rs @@ -1528,10 +1528,9 @@ impl Ast { let is_comptime = match tag { Tag::Parameter => false, // TODO: figure out if there are function protos that arent const - Tag::FunctionProto => true, - Tag::FunctionDecl | Tag::Block | Tag::BlockTrailingExpr => { - are_children_comptime(self, cache) - } + // Tag::FunctionProto | Tag::FunctionDecl | Tag::Block | Tag::BlockTrailingExpr => { + // are_children_comptime(self, cache) + // } Tag::Constant => true, Tag::ReturnStmt => true, Tag::ReturnExprStmt => are_children_comptime(self, cache), @@ -1548,7 +1547,7 @@ impl Ast { | Tag::PointerType | Tag::ArrayType | Tag::TypeDeclRef => true, - Tag::CallExpr => are_children_comptime(self, cache), + // Tag::CallExpr => are_children_comptime(self, cache), // Tag::FieldAccess => { // let parent = data.as_index_intern().0; // cache.mark_as_dominated_by(index, parent); @@ -2253,7 +2252,7 @@ pub mod ast_gen { let extra_nodes = cache .inner .iter() - .filter(|(i, b)| **b) + .filter(|(_, b)| **b) .filter_map(|(i, _)| { (!node_map.contains(i)).then(|| node_map.push(*i)) })