-
Notifications
You must be signed in to change notification settings - Fork 19
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
compiler/checker: fix corner cases in field selector
This change implements field finding by name instead of using the reflect method of the struct type. This resolve some corner cases in the find. For example the 'fieldByName' method checks if the field is exported before checking if there is an ambiguous selector error to return. Checking if the field can be accessed by the code in the current package is done on the main struct instead of the struct where the field is located. This change fixes these issues.
- Loading branch information
Showing
3 changed files
with
192 additions
and
86 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