I don't think it is feasible or useful to issue this error in the compiler.
I think it might be possible in the vet tool.
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
g...@googlecode.com
unread,
Dec 5, 2014, 7:16:09 PM12/5/14
Reply to author
Sign in to reply to author
Forward
Sign in to forward
Delete
You do not have permission to delete messages in this group
Copy link
Report message
Show original message
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
So what's the pattern? A deferred anon function assigns to an enclosing
local that is never
used within the deferred function, and is not a named return parameter?
This isn't necessarily a bug, as it's very hard to prove that the store is
dead. Consider:
http://play.golang.org/p/5p_IUn56qA
defer/panic code is so rare (and so inherently complex) that I doubt it
would be worth looking for this pattern in vet.