mirror of
https://github.com/golang/go
synced 2024-11-23 21:30:08 -07:00
1170771074
Historically, Objects in go/types were canonical, meaning each entity was represented by exactly one variable and could thus be identified by its address. With object instantiation this is no longer the case: Var and Func objects must be copied to hold substituted type information, and there may be more than one Var or Func variable representing the same source-level entity. This CL adds Origin methods to *Var and *Func, so users can efficiently navigate to the corresponding canonical object on the generic type. Fixes #51682 Change-Id: Ia49e15bd6515e1db1eb3b09b88ba666659601316 Reviewed-on: https://go-review.googlesource.com/c/go/+/395535 Reviewed-by: Robert Griesemer <gri@google.com> Run-TryBot: Robert Findley <rfindley@google.com> Reviewed-by: Alan Donovan <adonovan@google.com> TryBot-Result: Gopher Robot <gobot@golang.org> |
||
---|---|---|
.. | ||
30715.txt | ||
35044.txt | ||
42710.txt | ||
43401.txt | ||
43724.txt | ||
45628.txt | ||
45754.txt | ||
46057.txt | ||
46059.txt | ||
46121.txt | ||
46229.txt | ||
47005.txt | ||
47579.txt | ||
48409.txt | ||
50062.txt | ||
50340.txt | ||
50599.txt | ||
50601.txt | ||
50674.txt | ||
50860.txt | ||
51082.txt | ||
51115.txt | ||
51414.txt | ||
51644.txt | ||
51682.txt | ||
51684.txt | ||
51868.txt |