go.tools/go/types: improved LookupFieldOrMethod, ast.Nodes for Scopes
- LookupFieldOrMethod now computes if any indirection was found on the
way to an embedded field/method: this is the only information required
to determine if a result method is in the method set.
- Scopes now provide a link to the ast.Node responsible for them.
Also:
- don't permit unsafe.Offsetof on method values
- report ambiguities in field/method lookup errors
- added some missing checks for anonymous fields
- lots of new tests
Fixes issue 5499.
LGTM https://codereview.appspot.com/10411045/diff/31001/go/types/check.go File go/types/check.go (right): https://codereview.appspot.com/10411045/diff/31001/go/types/check.go#newcode26 go/types/check.go:26: // TODO(gri) Decide if this should be a ...
10 years, 9 months ago
(2013-06-21 13:54:26 UTC)
#2
https://codereview.appspot.com/10411045/diff/31001/go/types/check.go File go/types/check.go (right): https://codereview.appspot.com/10411045/diff/31001/go/types/check.go#newcode26 go/types/check.go:26: // TODO(gri) Decide if this should be a permanent ...
10 years, 9 months ago
(2013-06-21 15:55:58 UTC)
#3
*** Submitted as https://code.google.com/p/go/source/detail?r=7a0800d10ab0&repo=tools *** go.tools/go/types: improved LookupFieldOrMethod, ast.Nodes for Scopes - LookupFieldOrMethod now computes ...
10 years, 9 months ago
(2013-06-21 15:57:30 UTC)
#4
*** Submitted as
https://code.google.com/p/go/source/detail?r=7a0800d10ab0&repo=tools ***
go.tools/go/types: improved LookupFieldOrMethod, ast.Nodes for Scopes
- LookupFieldOrMethod now computes if any indirection was found on the
way to an embedded field/method: this is the only information required
to determine if a result method is in the method set.
- Scopes now provide a link to the ast.Node responsible for them.
Also:
- don't permit unsafe.Offsetof on method values
- report ambiguities in field/method lookup errors
- added some missing checks for anonymous fields
- lots of new tests
Fixes issue 5499.
R=adonovan
CC=golang-dev
https://codereview.appspot.com/10411045
Issue 10411045: code review 10411045: go.tools/go/types: return indirection information from ...
(Closed)
Created 10 years, 9 months ago by gri
Modified 10 years, 9 months ago
Reviewers:
Base URL:
Comments: 14