1
0
mirror of https://github.com/golang/go synced 2024-11-11 21:40:21 -07:00
go/api/next
Robert Findley 1170771074 go/types, types2: set an origin object for vars and funcs
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>
2022-05-17 21:28:43 +00:00
..
30715.txt net/http: add MaxBytesError 2022-04-25 23:36:50 +00:00
35044.txt crypto/x509: add CertPool.Clone 2022-04-13 19:04:59 +00:00
42710.txt hash/maphash: add Bytes and String 2022-04-05 18:01:26 +00:00
43401.txt encoding/csv: add Reader.InputOffset method 2022-05-14 04:25:13 +00:00
43724.txt os/exec: return error when PATH lookup would use current directory 2022-05-02 14:54:05 +00:00
45628.txt encoding/xml: expose decoder line and column 2022-03-27 20:26:46 +00:00
45754.txt
46057.txt api: add x509.CertPool.Equal to next/46057.txt 2022-04-05 03:54:36 +00:00
46059.txt
46121.txt html/template: make FuncMap a type alias of text/template.FuncMap 2022-03-31 00:54:34 +00:00
46229.txt debug: define ELF relocation for loong64 2022-04-04 21:43:42 +00:00
47005.txt
47579.txt fmt: add Append, Appendln, Appendf 2022-05-17 18:55:46 +00:00
48409.txt runtime/debug: export SetMemoryLimit 2022-05-03 15:14:09 +00:00
50062.txt time: add Time.ZoneBounds 2022-05-17 03:26:28 +00:00
50340.txt sort: add Find function 2022-04-07 14:42:13 +00:00
50599.txt os/exec: set PWD implicitly if Dir is non-empty and Env is nil 2022-04-21 17:37:05 +00:00
50601.txt
50674.txt crypto/x509: add new CRL parser, deprecate old one 2022-04-05 23:32:55 +00:00
50860.txt sync/atomic: add typed atomic values 2022-05-04 18:05:18 +00:00
51082.txt go/doc: use go/doc/comment 2022-04-11 16:31:52 +00:00
51115.txt io: add an Err field to LimitedReader 2022-05-04 20:06:32 +00:00
51414.txt
51644.txt encoding/binary: add AppendVarint AppendUvarint 2022-04-15 01:19:37 +00:00
51682.txt go/types, types2: set an origin object for vars and funcs 2022-05-17 21:28:43 +00:00
51684.txt regexp/syntax: rename ErrInvalidDepth to ErrNestingDepth 2022-04-22 22:35:03 +00:00
51868.txt debug/pe: add APIs for reading section def aux info 2022-03-31 14:57:35 +00:00