This commit is contained in:
Felipe Pena 2025-09-09 18:37:03 -03:00
parent 98976c6e27
commit 4bd5ef73fe

View file

@ -145,7 +145,7 @@ fn (mut c Checker) match_expr(mut node ast.MatchExpr) ast.Type {
node.cond)
c_str = '${expr} == ${c.table.type_to_str(branch_type)}'
} else {
is_function := c.table.sym(node.cond_type).kind == .function
is_function := c.table.final_sym(node.cond_type).kind == .function
if !is_function {
// $match a { $int {}
comptime_match_branch_result = c.check_compatible_types(node.cond_type,