Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Jan 25, 2025
1 parent fa6d50c commit 3a661a5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/gen/c/cgen.v
Original file line number Diff line number Diff line change
Expand Up @@ -6086,7 +6086,7 @@ fn (mut g Gen) check_expr_is_const(expr ast.Expr) bool {
return g.check_expr_is_const(expr.expr)
}
ast.PrefixExpr {
return g.check_expr_is_const(expr.right)
return expr.right is ast.Ident || g.check_expr_is_const(expr.right)
}
else {
return false
Expand Down

0 comments on commit 3a661a5

Please sign in to comment.