Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Jan 13, 2025
1 parent 9cb1400 commit d860319
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion vlib/v/checker/assign.v
Original file line number Diff line number Diff line change
Expand Up @@ -453,7 +453,8 @@ fn (mut c Checker) assign_stmt(mut node ast.AssignStmt) {
&& c.table.cur_fn != unsafe { nil }
&& c.table.cur_fn.generic_names.len != 0
&& !right.comptime_ret_val
&& c.type_resolver.is_generic_expr(right) {
&& c.type_resolver.is_generic_expr(right)
&& right.return_type_generic.has_flag(.generic) {
// mark variable as generic var because its type changes according to fn return generic resolution type
left.obj.ct_type_var = .generic_var
}
Expand Down
2 changes: 1 addition & 1 deletion vlib/v/gen/c/fn.v
Original file line number Diff line number Diff line change
Expand Up @@ -2727,7 +2727,7 @@ fn (mut g Gen) ref_or_deref_arg(arg ast.CallArg, expected_type ast.Type, lang as
styp := g.base_type(arg_typ)
g.write('*(${styp}*)')
g.expr_with_cast(arg.expr, arg_typ, expected_type)
g.write('.data/**/')
g.write('.data')
return
}
// check if the argument must be dereferenced or not
Expand Down

0 comments on commit d860319

Please sign in to comment.