Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
felipensp committed Oct 7, 2024
1 parent 9db7a8b commit c631d51
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion vlib/v/checker/fn.v
Original file line number Diff line number Diff line change
Expand Up @@ -135,7 +135,7 @@ fn (mut c Checker) fn_decl(mut node ast.FnDecl) {
node.return_type_pos)
}
}
if c.needs_unwrap_generic_type(node.return_type) {
if gs.kind == .struct_ && c.needs_unwrap_generic_type(node.return_type) {
// resolve generic Array[T], Map[T] generics, avoid recursive generic resolving type
if c.ensure_generic_type_specify_type_names(node.return_type, node.return_type_pos) {
c.table.unwrap_generic_type_ex(node.return_type, c.table.cur_fn.generic_names,
Expand Down

0 comments on commit c631d51

Please sign in to comment.