Skip to content

Commit f55c295

Browse files
authored
checker: rewrite comptime_if_cond() to support comptime if cond evaluate (fix #24938) (fix #25099) (#25122)
1 parent 4a4434a commit f55c295

12 files changed

Lines changed: 770 additions & 619 deletions

‎vlib/v/checker/checker.v‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -100,8 +100,8 @@ pub mut:
100100
smartcast_mut_pos token.Pos // match mut foo, if mut foo is Foo
101101
smartcast_cond_pos token.Pos // match cond
102102
ct_cond_stack []ast.Expr
103-
ct_user_defines map[string]ComptimeBranchSkipState
104-
ct_system_defines map[string]ComptimeBranchSkipState
103+
ct_user_defines map[string]bool
104+
ct_system_defines map[string]bool
105105
mut:
106106
stmt_level int // the nesting level inside each stmts list;
107107
// .stmt_level is used to check for `evaluated but not used` ExprStmts like `1 << 1`

0 commit comments

Comments
 (0)