title: Go fails to infer type in assignment: "non-name on left side of :="
body: <p>This snippet works as expected <a href="http://play.golang.org/p/VuCl-OKMav" rel="noreferrer">play.golang.org/p/VuCl-OKMav</a></p>
  
  <pre class="lang-go prettyprint-override"><code>i := 10
  next := 11
  prev, i := i, next
  </code></pre>
  
  <p>However this nearly identical snippet gives <code>non-name f.Bar on left side of :=</code> <a href="http://play.golang.org/p/J8NNWPugQG" rel="noreferrer">play.golang.org/p/J8NNWPugQG</a></p>
  
  <pre class="lang-go prettyprint-override"><code>type Foo struct {
      Bar int
  }
  
  f := Foo{10}
  next := 11
  prev, f.Bar := f.Bar, next
  </code></pre>
  
  <p>What's special about the struct that stops type inference? Is this a bug?</p>