mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
reflect: make PtrTo(FuncOf(...)) not crash
Change-Id: Ie67e295bf327126dfdc75b73979fe33fbcb79ad9 Reviewed-on: https://go-review.googlesource.com/10150 Reviewed-by: Austin Clements <austin@google.com>
This commit is contained in:
parent
512f75e8df
commit
d36cc02795
2 changed files with 23 additions and 2 deletions
|
|
@ -1609,7 +1609,7 @@ func FuncOf(in, out []Type, variadic bool) Type {
|
|||
ft.ptrToThis = nil
|
||||
funcLookupCache.m[hash] = append(funcLookupCache.m[hash], &ft.rtype)
|
||||
|
||||
return ft
|
||||
return &ft.rtype
|
||||
}
|
||||
|
||||
// funcStr builds a string representation of a funcType.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue