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.

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