Skip to content

Commit 56cc49b

Browse files
committed
fixes
1 parent 173ec87 commit 56cc49b

File tree

1 file changed

+6
-12
lines changed

1 file changed

+6
-12
lines changed

types_func.go

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
package gotype
22

3-
import "bytes"
3+
import (
4+
"bytes"
5+
)
46

57
type typeFunc struct {
68
typeBase
@@ -16,18 +18,10 @@ func (t *typeFunc) String() string {
1618
if i != 0 {
1719
buf.WriteString(", ")
1820
}
19-
if t.variadic && i+1 == len(t.results) {
20-
if d, ok := v.(*typeDeclaration); ok {
21-
if d0, ok := d.declaration.(*typeSlice); ok {
22-
buf.WriteString(d.name)
23-
buf.WriteString(" ...")
24-
buf.WriteString(d0.elem.String())
25-
continue
26-
}
27-
}
28-
}
2921
buf.WriteString(v.String())
30-
22+
}
23+
if t.variadic {
24+
buf.WriteString("...")
3125
}
3226
buf.WriteString(") (")
3327

0 commit comments

Comments
 (0)