diff options
author | Robert Griesemer <gri@golang.org> | 2021-03-29 15:15:56 -0700 |
---|---|---|
committer | Robert Griesemer <gri@golang.org> | 2021-04-06 18:57:04 +0000 |
commit | 93466cc1b697836200e73bb103522324d38e894f (patch) | |
tree | ec8e32fa317b4bdf994d192c79b61798e055aa21 /src/cmd/compile/internal/types2/assignments.go | |
parent | d57189e92b9b4cd6909aefbcee02e9cb6fc05cff (diff) | |
download | go-93466cc1b697836200e73bb103522324d38e894f.tar.gz go-93466cc1b697836200e73bb103522324d38e894f.zip |
cmd/compile/internal/types2: review of pos.go and move into syntax package
This moves the two helper functions startPos and endPos into
the syntax package where they belong. Export the functions and
adjust dependent code.
Change-Id: I8170faeadd7cfa8f53009f81fcffd50ec0fc6a98
Reviewed-on: https://go-review.googlesource.com/c/go/+/305578
Trust: Robert Griesemer <gri@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Diffstat (limited to 'src/cmd/compile/internal/types2/assignments.go')
-rw-r--r-- | src/cmd/compile/internal/types2/assignments.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types2/assignments.go b/src/cmd/compile/internal/types2/assignments.go index b8cf46c364..ddcb5e00b3 100644 --- a/src/cmd/compile/internal/types2/assignments.go +++ b/src/cmd/compile/internal/types2/assignments.go @@ -377,7 +377,7 @@ func (check *Checker) shortVarDecl(pos syntax.Pos, lhs, rhs []syntax.Expr) { // a function begins at the end of the ConstSpec or VarSpec (ShortVarDecl // for short variable declarations) and ends at the end of the innermost // containing block." - scopePos := endPos(rhs[len(rhs)-1]) + scopePos := syntax.EndPos(rhs[len(rhs)-1]) for _, obj := range newVars { check.declare(scope, nil, obj, scopePos) // recordObject already called } |