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:
Russ Cox 2015-05-15 14:46:20 -04:00
parent 512f75e8df
commit d36cc02795
2 changed files with 23 additions and 2 deletions

View file

@ -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.