mirror of
https://github.com/golang/go
synced 2024-11-19 01:24:39 -07:00
49797d04a8
In cases like: var foo *someType = bar.(some<>) We will now complete "some" to "*someType". This involved two changes: 1. Properly detect expected type as *someType in above example. To do this I just removed *ast.TypeAssertExpr from breaksExpectedTypeInference() so we continue searching up the AST for the expected type. 2. If the given type name T doesn't match, also try *T. If *T does match, we mark the candidate as "makePointer=true" so we know to prepend the "*" when formatting the candidate. Change-Id: I05859c68082a798141755b614673a1483d864e3e Reviewed-on: https://go-review.googlesource.com/c/tools/+/212717 Run-TryBot: Muir Manders <muir@mnd.rs> TryBot-Result: Gobot Gobot <gobot@golang.org> Reviewed-by: Rebecca Stambler <rstambler@golang.org> |
||
---|---|---|
.. | ||
func_rank.go.in |