Skip to content

Commit

Permalink
Fix function result count
Browse files Browse the repository at this point in the history
  • Loading branch information
chriso committed Nov 21, 2023
1 parent 3dede67 commit 38b47f4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion types/inspect.go
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,7 @@ func (t *Type) Param(i int) *Type {

// NumResult is the number of results for function types.
func (t *Type) NumResult() int {
return len(t.typ.Params)
return len(t.typ.Results)
}

// Result is the type of a function result with the specified index.
Expand Down

0 comments on commit 38b47f4

Please sign in to comment.