mirror of
https://github.com/golang/go
synced 2024-11-23 22:10:04 -07:00
also cmd/compile/internal/syntax
Change-Id: If10974dd4c44396f553d1581773e37f045a7d224
This commit is contained in:
parent
f1f04d35e9
commit
05e596cb5b
@ -886,10 +886,12 @@ func (p *printer) printSignature(sig *FuncType) {
|
||||
if list := sig.ResultList; list != nil {
|
||||
p.print(blank)
|
||||
if len(list) == 1 && list[0].Name == nil {
|
||||
p.printNode(list[0].Type)
|
||||
} else {
|
||||
p.printParameterList(list, 0)
|
||||
if _, ok := list[0].Type.(*DotsType); !ok {
|
||||
p.printNode(list[0].Type)
|
||||
return
|
||||
}
|
||||
}
|
||||
p.printParameterList(list, 0)
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -140,6 +140,8 @@ var stringTests = [][2]string{
|
||||
{"package p; type _[P ((C)),] int", "package p; type _[P C] int"},
|
||||
{"package p; type _[P, Q ((C))] int", "package p; type _[P, Q C] int"},
|
||||
|
||||
dup("package A; func A() (...A)"),
|
||||
|
||||
// TODO(gri) expand
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user