1
0
mirror of https://github.com/golang/go synced 2024-11-11 21:20:21 -07:00
go/api/next
Robert Griesemer 8fd2875c3e go/types, types2: make the new comparable semantics the default
Ordinary interface types now satisfy comparable constraints. This
is a fully backward-compatible change: it simply permits additional
code to be valid that wasn't valid before.

This change makes the new comparable semantics the default behavior,
depending on the Go -lang version.

It also renames the flag types2.Config.AltComparableSemantics to
types2.Config.OldComparableSemantics and inverts its meaning
(or types.Config.oldComparableSemantics respectively).

Add new predicate Satisfies (matching the predicate Implements but
for constraint satisfaction), per the proposal description.

Adjust some existing tests by setting -oldComparableSemantics
and add some new tests that verify version-dependent behavior.

The compiler flag -oldcomparable may be used to temporarily
switch back to the Go 1.18/1.19 behavior should this change
cause problems, or to identify that a problem is unrelated
to this change. The flag will be removed for Go 1.21.

For #52509.
For #56548.
For #57011.

Change-Id: I8b3b3d9d492fc24b0693567055f0053ccb5aeb42
Reviewed-on: https://go-review.googlesource.com/c/go/+/454575
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
2022-12-01 19:48:07 +00:00
..
19974.txt crypto: allow hash.Hash for OAEP and MGF1 to be specified independently 2022-11-09 23:51:34 +00:00
31804.txt crypto/ed25519: implement Ed25519ctx and Ed25519ph with context 2022-11-21 15:23:39 +00:00
41773.txt net/http: add Server.DisableOptionsHandler for custom handling of OPTIONS * 2022-08-15 18:57:35 +00:00
42537.txt cmd/api: make check pickier about api/*.txt 2022-11-02 19:08:10 +00:00
43620.txt cmd/api: make check pickier about api/*.txt 2022-11-02 19:08:10 +00:00
43958.txt crypto/x509: implement SetFallbackRoots 2022-11-18 23:57:10 +00:00
45038.txt bytes: add Clone function 2022-08-15 19:17:20 +00:00
45899.txt cmd/api: make check pickier about api/*.txt 2022-11-02 19:08:10 +00:00
46731.txt cmd/cgo: add and use runtime/cgo.Incomplete instead of //go:notinheap 2022-08-28 16:04:49 +00:00
46746.txt cmd/api: make check pickier about api/*.txt 2022-11-02 19:08:10 +00:00
47209.txt path/filepath, io/fs: add SkipAll 2022-08-25 18:50:37 +00:00
48000.txt reflect: add Value.Grow 2022-10-15 17:02:11 +00:00
48152.txt crypto/tls: add CertificateVerificationError to tls handshake 2022-11-18 18:50:57 +00:00
50429.txt cmd/api: make check pickier about api/*.txt 2022-11-02 19:08:10 +00:00
50436.txt os/exec: add the Cancel and WaitDelay fields 2022-10-25 03:34:36 +00:00
50770.txt time: implement Compare method 2022-09-19 17:10:49 +00:00
51246.txt syscall: add CgroupFD support for ForkExec on Linux 2022-09-09 15:34:16 +00:00
51365.txt context: add APIs for writing and reading cancelation cause 2022-11-08 13:51:16 +00:00
51430.txt runtime/coverage: revise/shorten function names 2022-10-05 14:59:05 +00:00
51668.txt fmt: add a function to recover the original format string given a State 2022-08-06 09:19:31 +00:00
51766.txt net/netip: add IPv6LinkLocalAllRouters and IPv6Loopback 2022-10-21 20:14:41 +00:00
51777.txt net/netip: add IPv6LinkLocalAllRouters and IPv6Loopback 2022-10-21 20:14:41 +00:00
51896.txt cmd/api: make check pickier about api/*.txt 2022-11-02 19:08:10 +00:00
51972.txt sync: add new Map method Swap, CompareAndSwap, CompareAndDelete 2022-11-15 17:35:42 +00:00
52221.txt crypto/ecdh: move ECDH method to PrivateKey 2022-11-16 14:37:29 +00:00
52376.txt reflect: add Value.SetZero 2022-08-26 17:15:08 +00:00
52746.txt time: add DateTime, DateOnly, and TimeOnly 2022-08-09 14:33:24 +00:00
53002.txt net/http/httputil: add ReverseProxy.Rewrite 2022-08-16 20:01:36 +00:00
53021.txt crypto/subtle: add XORBytes 2022-08-17 18:47:33 +00:00
53200.txt go/token: add (*FileSet).RemoveFile(*File) method 2022-08-16 16:27:35 +00:00
53202.txt go/ast: record start and end of file in File.File{Start,End} 2022-09-28 20:37:59 +00:00
53280.txt syscall: remove FreeBSD 11 and below 64bit inode compatibility shims 2022-09-16 01:17:28 +00:00
53346.txt encoding/xml: add (*Encoder).Close 2022-08-23 18:24:30 +00:00
53356.txt debug/elf: fix reloc number of R_PPC64_SECTOFF_LO_DS 2022-08-27 02:36:28 +00:00
53435.txt errors, fmt: add support for wrapping multiple errors 2022-09-29 18:40:40 +00:00
53482.txt cmd/api: make check pickier about api/*.txt 2022-11-02 19:08:10 +00:00
54136.txt net/http: add ResponseController and per-handler timeouts 2022-11-10 18:18:03 +00:00
54222.txt debug/elf: add new-style LoongArch reloc types 2022-08-11 19:32:40 +00:00
54251.txt debug/pe: add IMAGE_FILE_MACHINE_RISCV{32,64,128} 2022-08-09 01:21:43 +00:00
54299.txt api/next/54299: add missing newline 2022-11-09 22:23:18 +00:00
54345.txt debug/elf: fix typo in R_PPC64_TPREL34 and R_PPC64_DTPREL34 2022-09-29 19:54:44 +00:00
55301.txt api: add newline to 55301.txt 2022-11-04 14:19:00 +00:00
55356.txt archive/tar, archive/zip: return ErrInsecurePath for unsafe paths 2022-11-16 23:36:48 +00:00
56041.txt regexp: add ErrLarge error 2022-11-02 18:15:21 +00:00
56088.txt crypto/ecdsa,crypto/x509: add encoding paths for NIST crypto/ecdh keys 2022-11-19 16:45:10 +00:00
56219.txt path/filepath: add IsLocal 2022-11-16 23:17:58 +00:00
56548.txt go/types, types2: make the new comparable semantics the default 2022-12-01 19:48:07 +00:00