mirror of
https://github.com/golang/go
synced 2024-11-19 01:04:40 -07:00
89082a3841
We were marking all literal candidates as addressable so we were getting invalid candidates like "&int()". Fix it to only mark literal struct, array, slice and map types as addressable. I also fixed the unnamed literal candidate to pass the dereferenced expected type. For example, if the expected type was "*[]int" we were passing a literal type of "*[]int" which wasn't working anymore. Now we pass "[]int" and take its address as "&[]int{}". Change-Id: I5d0ee074d3cc91c39dd881630583e31be5a05579 Reviewed-on: https://go-review.googlesource.com/c/tools/+/212677 Run-TryBot: Muir Manders <muir@mnd.rs> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
---|---|---|
.. | ||
apidiff | ||
fastwalk | ||
gopathwalk | ||
imports | ||
jsonrpc2 | ||
lsp | ||
memoize | ||
module | ||
semver | ||
span | ||
telemetry | ||
testenv | ||
tool | ||
xcontext |