From 860a4f4b1ee2d9c172f31c565b4bf1593d7b1bf3 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sat, 22 Feb 2025 12:29:57 -0300 Subject: [PATCH] fix --- vlib/v/checker/checker.v | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 91a6789e186210..1ae419bf69f4db 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -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)