Go fails to infer type in assignment: “non-name on left side of :=”

前端 未结 3 1099
深忆病人
深忆病人 2020-12-06 09:10

This snippet works as expected play.golang.org/p/VuCl-OKMav

i := 10
next := 11
prev, i := i, next

Ho

3条回答
  •  伪装坚强ぢ
    2020-12-06 09:38

    It's an open issue.

    Issue 6842: spec: Assigning to fields with short declaration notation

提交回复
热议问题