1
0
mirror of https://github.com/golang/go synced 2024-09-30 20:28:32 -06:00
Commit Graph

5 Commits

Author SHA1 Message Date
Robert Griesemer
5dca7d8bd1 go.tools/go/types: LookupFieldOrMethod checks method set
LookupFieldOrMethod now also decides whether a found
method is actually in the method set. Simplifies call
sites. Added corresponding API tests.

TODO (separate CL): Decide what the correct value for
the indirect result should be (as required for code
generation). For now, the result value for indirect
is unchanged from before if a field/method is found.

Fixes golang/go#8584.

LGTM=adonovan
R=adonovan
CC=golang-codereviews
https://golang.org/cl/132260043
2014-08-28 13:03:13 -07:00
Paul Nasrat
89156360f9 go.tools/refactor/eg: Support promoted fields and methods.
As per http://golang.org/ref/spec#Struct_types enable eg tool
to wildcard match against promoted fields and methods.

LGTM=adonovan
R=adonovan, gordon.klaus
CC=golang-codereviews
https://golang.org/cl/129260043
2014-08-25 16:26:54 -04:00
Alan Donovan
f2db24a319 go.tools/go/loader: use new types.TypeAndValue mode predicates.
PackageInfo:
- deleted IsType
- inlined + deleted: ValueOf, TypeCaseVar, ImportSpecPkg
- on failure, TypeOf accessor now returns nil (was: panic)

go/ssa: avoid extra map lookups by using Uses or Defs directly when safe to do so,
and keeping the TypeAndValue around in expr0().

LGTM=gri
R=gri, pcc
CC=golang-codereviews
https://golang.org/cl/107650043
2014-07-11 10:50:09 +01:00
Alan Donovan
d014be43ae go.tools/go/types: remove PackageObj Selection - not needed
LGTM=gri
R=gri
CC=golang-codereviews
https://golang.org/cl/105920043
2014-06-12 18:05:33 -04:00
Alan Donovan
bfcffc697d go.tools/refactor/eg: an example-based refactoring tool.
See refactor/eg/eg.go for details.

LGTM=crawshaw
R=crawshaw, gri, kamil.kisiel, josharian
CC=golang-codereviews
https://golang.org/cl/81010043
2014-04-02 12:24:55 -04:00