From 66823c55d125484a2266e3d9abb511232d21e4d9 Mon Sep 17 00:00:00 2001 From: Felipe Pena Date: Sat, 22 Feb 2025 20:51:32 -0300 Subject: [PATCH] fix --- vlib/v/checker/checker.v | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/vlib/v/checker/checker.v b/vlib/v/checker/checker.v index 59ffa2d4feb232..105d622789564f 100644 --- a/vlib/v/checker/checker.v +++ b/vlib/v/checker/checker.v @@ -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)