mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
reflect: unnamed interface types have no name
Fixes #15468 Change-Id: I8723171f87774a98d5e80e7832ebb96dd1fbea74 Reviewed-on: https://go-review.googlesource.com/22524 Reviewed-by: Ian Lance Taylor <iant@golang.org> Run-TryBot: David Crawshaw <crawshaw@golang.org>
This commit is contained in:
parent
74a9bad638
commit
217be5b35d
3 changed files with 21 additions and 10 deletions
|
|
@ -867,6 +867,9 @@ func (t *rtype) Name() string {
|
|||
if hasPrefix(s, "func(") {
|
||||
return ""
|
||||
}
|
||||
if hasPrefix(s, "interface {") {
|
||||
return ""
|
||||
}
|
||||
switch s[0] {
|
||||
case '[', '*', '<':
|
||||
return ""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue