Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Dec 3, 2023
1 parent 3da89b5 commit 4eec1c6
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion vlib/v/checker/fn.v
Original file line number Diff line number Diff line change
Expand Up @@ -1591,8 +1591,14 @@ fn (mut c Checker) get_comptime_args(func ast.Fn, node_ ast.CallExpr, concrete_t
}
} else if call_arg.expr is ast.ComptimeSelector {
ct_value := c.get_comptime_var_type(call_arg.expr)
param_typ_sym := c.table.sym(param_typ)
if ct_value != ast.void_type {
comptime_args[i] = ct_value
cparam_type_sym := c.table.sym(c.unwrap_generic(ct_value))
if param_typ_sym.kind == .array && cparam_type_sym.info is ast.Array {
comptime_args[i] = cparam_type_sym.info.elem_type
} else {
comptime_args[i] = ct_value
}
}
}
}
Expand Down

0 comments on commit 4eec1c6

Please sign in to comment.