mirror of https://github.com/golang/go.git
In cases like:
func foo[A int|string](a A) {}
foo[_](<>)
We now prefer ints and strings at <> by matching against the type
constraint. Note that even if "_" is replaced with "int", we still
prefer strings since the type checker doesn't seem to want to
instantiate foo unless the params check out.
Change-Id: I0e7acfef0775752a96fcfe23e7e2e3d939820eee
Reviewed-on: https://go-review.googlesource.com/c/tools/+/394017
Run-TryBot: Muir Manders <muir@mnd.rs>
gopls-CI: kokoro <noreply+kokoro@google.com>
TryBot-Result: Gopher Robot <gobot@golang.org>
Reviewed-by: Robert Findley <rfindley@google.com>
Reviewed-by: Suzy Mueller <suzmue@golang.org>
Auto-Submit: Peter Weinberger <pjw@google.com>
|
||
|---|---|---|
| .. | ||
| analysisinternal | ||
| apidiff | ||
| event | ||
| fakenet | ||
| fastwalk | ||
| gocommand | ||
| gopathwalk | ||
| imports | ||
| jsonrpc2 | ||
| jsonrpc2_v2 | ||
| lsp | ||
| memoize | ||
| packagesinternal | ||
| proxydir | ||
| span | ||
| stack | ||
| testenv | ||
| tool | ||
| typeparams | ||
| typesinternal | ||
| xcontext | ||