mirror of
https://github.com/golang/go
synced 2024-11-19 03:44:40 -07:00
5d636af2a9
In type assertion expressions and type switch clauses we now infer the type from which candidates must be assertable. For example in: var foo io.Writer bar := foo.(<>) When suggesting concrete types we will prefer types that actually implement io.Writer. I also added support for the "*" type name modifier. Using the above example: bar := foo.(*<>) we will prefer type T such that *T implements io.Writer. Change-Id: Ib483bf5e7b339338adc1bfb17b34bc4050d05ad1 GitHub-Last-Rev: 965b028cc00b036019bfdc97561d9e09b7b912ec GitHub-Pull-Request: golang/tools#123 Reviewed-on: https://go-review.googlesource.com/c/tools/+/183137 Run-TryBot: Rebecca Stambler <rstambler@golang.org> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
---|---|---|
.. | ||
good0.go | ||
good1.go |