]> Cypherpunks repositories - gostls13.git/commit
cmd/compile/internal/types2: enable TestSelection API test
authorRobert Griesemer <gri@golang.org>
Sun, 22 Aug 2021 21:55:12 +0000 (14:55 -0700)
committerRobert Griesemer <gri@golang.org>
Sun, 22 Aug 2021 22:30:37 +0000 (22:30 +0000)
commit8fcc614360cac2c23aafeb2fdc637c72ff1d7dfd
treed518f409e42fa2b6884bc06863beffc04bdf7467
parent5d5e50c3db2ad15bef4ddc4e2f946d0628deda2d
cmd/compile/internal/types2: enable TestSelection API test

This test was never fully ported from go/types. Implement
a conversion function from syntax.Pos to string index so
that the test can be enabled again.

Also renamed the local variable syntax to segment to avoid
confusion with the syntax package.

Change-Id: I1b34e50ec138403798efb14c828545780f565507
Reviewed-on: https://go-review.googlesource.com/c/go/+/344253
Trust: Robert Griesemer <gri@golang.org>
Trust: Dan Scales <danscales@google.com>
Run-TryBot: Robert Griesemer <gri@golang.org>
Reviewed-by: Dan Scales <danscales@google.com>
src/cmd/compile/internal/types2/api_test.go