You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (go version)?
go1.10
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (go env)?
all
What did you do?
When storing the results into two variables, the special form of a map index operation can return two parts. The same is not true in a return statement, even when the function signature makes this unambiguous.
Please answer these questions before submitting your issue. Thanks!
What version of Go are you using (
go version
)?go1.10
Does this issue reproduce with the latest release?
Yes
What operating system and processor architecture are you using (
go env
)?all
What did you do?
When storing the results into two variables, the special form of a map index operation can return two parts. The same is not true in a return statement, even when the function signature makes this unambiguous.
https://play.golang.org/p/mmJ8ZlWC2yn
What did you expect to see?
I would expect
CheckCache_works
andCheckCache_shouldWork
to function identically.What did you see instead?
gc refuses to compile the return statement, saying:
Apologies if this duplicates a previous issue. I found searching for and naming this issue pretty hard.
The text was updated successfully, but these errors were encountered: