Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Feb 23, 2025
1 parent 3bd2aa5 commit 2f886e5
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/checker/checker.v
Original file line number Diff line number Diff line change
Expand Up @@ -3574,7 +3574,7 @@ fn (mut c Checker) cast_expr(mut node ast.CastExpr) ast.Type {
c.error('cannot cast `${ft}` to rune, use `${snexpr}.runes()` instead.', node.pos)
} else if !from_type.is_ptr() && from_type != ast.string_type
&& final_from_sym.info is ast.Struct && !final_from_sym.info.is_empty_struct()
&& final_to_sym.is_int() {
&& (final_to_sym.is_int() || final_to_sym.is_float()) {
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 2f886e5

Please sign in to comment.