go/src/internal
Robert Griesemer 1dd24d8216 go/types, types2: don't infer type argument for unused parameter in interfaces
Two interface types that are assignable don't have to be identical;
specifically, if they are defined types, they can be different
defined types. If those defined types specify type parameters which
are never used, do not infer a type argument based on the instantiation
of a matching defined type.

Adjusted three existing tests where we inferred type arguments incorrectly.

Fixes #60377.

Change-Id: I91fb207235424b3cbc42b5fd93eee619e7541cb7
Reviewed-on: https://go-review.googlesource.com/c/go/+/498315
Auto-Submit: Robert Griesemer <gri@google.com>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Robert Griesemer <gri@google.com>
Run-TryBot: Robert Griesemer <gri@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
2023-05-25 21:37:01 +00:00
..
abi cmd/link, internal/abi: minor follow-up cleanups 2023-05-17 18:24:13 +00:00
bisect internal/bisect: copy parser changes from CL 494177 2023-05-11 01:52:24 +00:00
buildcfg all: replace fmt.Sprintf("%d") with strconv.Itoa 2023-03-31 18:41:24 +00:00
bytealg cmd/internal/obj/ppc64: modify PCALIGN to ensure alignment 2023-04-21 16:47:45 +00:00
cfg cmd/go: abstract build cache, support implementations via child process 2023-05-25 00:49:37 +00:00
coverage internal/coverage: fix comment dupword, error typo 2023-05-24 20:23:21 +00:00
cpu internal/cpu: add a detection for Neoverse(N2, V2) cores 2023-04-25 14:08:20 +00:00
dag
diff
fmtsort
fuzz cmd/go: add check for unknown godebug setting 2023-04-18 13:19:19 +00:00
goarch
godebug internal/godebug: make test godebug calls not vary 2023-05-10 20:40:05 +00:00
godebugs cmd/go/internal/cache: use internal/godebug for three GODEBUGs 2023-05-24 22:05:27 +00:00
goexperiment cmd/go: abstract build cache, support implementations via child process 2023-05-25 00:49:37 +00:00
goos all: add wasip1 definitions 2023-03-30 18:50:57 +00:00
goroot internal/testenv: avoid rebuilding all of std in WriteImportcfg 2023-02-02 19:27:33 +00:00
goversion
intern cmd/go: add check for unknown godebug setting 2023-04-18 13:19:19 +00:00
itoa
lazyregexp
lazytemplate
nettrace
obscuretestdata
oserror
pkgbits all: re-run stringer 2023-04-11 20:24:07 +00:00
platform cmd/dist: refine test conditions and enable more cgo tests on Android, iOS 2023-05-19 01:37:31 +00:00
poll net: implement wasip1 FileListener and FileConn 2023-05-25 00:12:41 +00:00
profile
race
reflectlite internal/reflectlite: common up types, remove code 2023-05-11 13:45:58 +00:00
safefilepath
saferio
singleflight internal/singleflight: move Done call in TestForgetUnshared 2023-03-29 22:21:50 +00:00
syscall runtime: change fcntl to return two values 2023-05-20 20:32:54 +00:00
sysinfo
testenv cmd/dist: refine test conditions and enable more cgo tests on Android, iOS 2023-05-19 01:37:31 +00:00
testlog
testpty
trace runtime: emit STW events for all pauses, not just those for the GC 2023-05-19 17:06:45 +00:00
txtar
types go/types, types2: don't infer type argument for unused parameter in interfaces 2023-05-25 21:37:01 +00:00
unsafeheader
xcoff all: fix misuses of "a" vs "an" 2023-04-04 14:20:53 +00:00
zstd internal/zstd: new internal package for zstd decompression 2023-04-18 20:34:13 +00:00