-
Notifications
You must be signed in to change notification settings - Fork 17.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
go/parser: fix incorrect resolution of receiver type parameters
Declare receiver type parameters in the function scope, but don't resolve them (for now), as ast.Object.Decl is not documented to hold *ast.Idents. This avoids incorrect resolution of identifiers to names outside the function scope. Also make tracing and error reporting more consistent. For #50956 Change-Id: I8cd61dd25f4c0f6b974221599b00e23d8da206a1 Reviewed-on: https://go-review.googlesource.com/c/go/+/382247 Trust: Robert Findley <rfindley@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Robert Griesemer <gri@golang.org> TryBot-Result: Gopher Robot <gobot@golang.org>
- Loading branch information
Showing
3 changed files
with
91 additions
and
16 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters