checker,cgen: evaluate comptime $if results in checker *only* (fix #25123) (fix #25156) (#25150)

This commit is contained in:
kbkpbot 2025-08-24 04:40:50 +08:00 committed by GitHub
parent 7dd91ecef7
commit a3f86eed1b
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
12 changed files with 605 additions and 461 deletions

View file

@ -1538,7 +1538,6 @@ fn (t Tree) if_branch(node ast.IfBranch) &Node {
obj.add_terse('cond', t.expr(node.cond))
obj.add('pos', t.pos(node.pos))
obj.add('body_pos', t.pos(node.body_pos))
obj.add_terse('pkg_exist', t.bool_node(node.pkg_exist))
obj.add_terse('stmts', t.array_node_stmt(node.stmts))
obj.add('scope', t.number_node(int(node.scope)))
obj.add('comments', t.array_node_comment(node.comments))