aboutsummaryrefslogtreecommitdiff
path: root/src/cmd/compile/internal/types2/labels.go
diff options
context:
space:
mode:
authorRobert Griesemer <gri@golang.org>2021-03-29 15:15:56 -0700
committerRobert Griesemer <gri@golang.org>2021-04-06 18:57:04 +0000
commit93466cc1b697836200e73bb103522324d38e894f (patch)
treeec8e32fa317b4bdf994d192c79b61798e055aa21 /src/cmd/compile/internal/types2/labels.go
parentd57189e92b9b4cd6909aefbcee02e9cb6fc05cff (diff)
downloadgo-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/labels.go')
-rw-r--r--src/cmd/compile/internal/types2/labels.go2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/cmd/compile/internal/types2/labels.go b/src/cmd/compile/internal/types2/labels.go
index d5878692f5..d3206988b5 100644
--- a/src/cmd/compile/internal/types2/labels.go
+++ b/src/cmd/compile/internal/types2/labels.go
@@ -11,7 +11,7 @@ import (
// labels checks correct label use in body.
func (check *Checker) labels(body *syntax.BlockStmt) {
// set of all labels in this body
- all := NewScope(nil, body.Pos(), endPos(body), "label")
+ all := NewScope(nil, body.Pos(), syntax.EndPos(body), "label")
fwdJumps := check.blockBranches(all, nil, nil, body.List)