mirror of
https://github.com/golang/go
synced 2024-11-26 07:27:59 -07:00
cmd/compile/internal/syntax: fix position of type parameter field
Change-Id: I8bca01b935301e7bd4efa55ed21921dbf31a75b9 Reviewed-on: https://go-review.googlesource.com/c/go/+/344575 Trust: Robert Griesemer <gri@golang.org> Run-TryBot: Robert Griesemer <gri@golang.org> TryBot-Result: Go Bot <gobot@golang.org> Reviewed-by: Matthew Dempsky <mdempsky@google.com>
This commit is contained in:
parent
647bef6c59
commit
4158e88f64
@ -1840,7 +1840,11 @@ func (p *parser) paramDeclOrNil(name *Name) *Field {
|
|||||||
}
|
}
|
||||||
|
|
||||||
f := new(Field)
|
f := new(Field)
|
||||||
f.pos = p.pos()
|
if name != nil {
|
||||||
|
f.pos = name.pos
|
||||||
|
} else {
|
||||||
|
f.pos = p.pos()
|
||||||
|
}
|
||||||
|
|
||||||
if p.tok == _Name || name != nil {
|
if p.tok == _Name || name != nil {
|
||||||
if name == nil {
|
if name == nil {
|
||||||
|
Loading…
Reference in New Issue
Block a user