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 b82584c commit 860a4f4
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 @@ -3569,7 +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.kind == .struct
&& to_sym.kind !in [.struct, .voidptr] {
&& final_to_sym.kind !in [.struct, .voidptr] {
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 860a4f4

Please sign in to comment.