Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Feb 22, 2025
1 parent bddf86c commit 66823c5
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions vlib/v/checker/checker.v
Original file line number Diff line number Diff line change
Expand Up @@ -3569,8 +3569,7 @@ fn (mut c Checker) cast_expr(mut node ast.CastExpr) ast.Type {
c.error('cannot cast incompatible option ${final_to_sym.name} `${ft}` to `${tt}`',
node.pos)
} else if !from_type.is_ptr() && final_from_sym.info is ast.Struct
&& !final_from_sym.info.is_empty_struct() && final_to_sym.kind != .rune
&& final_to_sym.is_int() {
&& !final_from_sym.info.is_empty_struct() && final_to_sym.is_int() {
ft := c.table.type_to_str(from_type)
tt := c.table.type_to_str(to_type)
c.error('cannot cast type `${ft}` to `${tt}`', node.pos)
Expand Down

0 comments on commit 66823c5

Please sign in to comment.