Yes, very tricky stuff. I've replied on the issue - it seems best to keep
discussion in one place.

Thank you very much for opening the issue!

On Mon, Aug 14, 2017 at 2:35 PM, Ian Lance Taylor <i...@golang.org> wrote:

> On Fri, Aug 11, 2017 at 4:38 PM, Ian Lance Taylor <i...@golang.org> wrote:
> > On Thu, Aug 10, 2017 at 1:43 PM,  <spen...@justin.tv> wrote:
> >>
> >> Yes, it makes sense that it would be impossible to really check at that
> >> level. What surprised me was that this does not trigger vet:
> >>
> >> for i := range slice {
> >>     go f(i)
> >>     _ = 1
> >> }
> >>
> >> Yet this does trigger vet:
> >>
> >> for i := range slice {
> >>     _ = 1
> >>     go f(i)
> >> }
> >>
> >> Is there something special about the last statement that makes it
> easier to
> >> check?
> >>
> >> For what it's worth, this exact bug caused real user-impacting issues
> at my
> >> company. The team responsible for the code was very surprised that vet
> did
> >> not alert them to the issue before it made it into production.
> >
> > I agree that this appears to be a bug.  I filed
> https://golang.org/issue/21412.
>
> If you read the issue, you will see that it is clearly more subtle
> than I initially thought.  If you have examples that vet could
> reliably catch that it does not catch today, that would be helpful.
> What did the code look like that had a uncaught case that surprised
> people?  Thanks.
>
> Ian
>

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to