Preparation for generation of function literal type checking code
from types2 source.
Change-Id: I6b3029c34c2507d356ac8874154537bc6c38a715
Reviewed-on: https://go-review.googlesource.com/c/go/+/610995
Reviewed-by: Tim King <taking@google.com>
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
LUCI-TryBot-Result: Go LUCI <golang-scoped@luci-project-accounts.iam.gserviceaccount.com>
// Set the Scope's extent to the complete "func (...) {...}"
// so that Scope.Innermost works correctly.
sig.scope.pos = e.Pos()
- sig.scope.end = syntax.EndPos(e)
+ sig.scope.end = endPos(e)
if !check.conf.IgnoreFuncBodies && e.Body != nil {
// Anonymous functions are considered part of the
// init expression/func declaration which contains
// Set the Scope's extent to the complete "func (...) {...}"
// so that Scope.Innermost works correctly.
sig.scope.pos = e.Pos()
- sig.scope.end = e.End()
+ sig.scope.end = endPos(e)
if !check.conf.IgnoreFuncBodies && e.Body != nil {
// Anonymous functions are considered part of the
// init expression/func declaration which contains