@@ -15,19 +15,19 @@ func assignments0() (int, int) {
1515 f3 := func() (int, int, int) { return 1, 2, 3 }
1616
1717 a, b, c = 1, 2, 3
18- a, b, c = 1 /* ERROR "assignment count mismatch " */ , 2
19- a, b, c = 1 /* ERROR "assignment count mismatch " */ , 2, 3, 4
18+ a, b, c = 1 /* ERROR "cannot assign [1-9]+ values to [1-9]+ variables " */ , 2
19+ a, b, c = 1 /* ERROR "cannot assign [1-9]+ values to [1-9]+ variables " */ , 2, 3, 4
2020 _, _, _ = a, b, c
2121
2222 a = f0 /* ERROR "used as value" */ ()
2323 a = f1()
24- a = f2 /* ERROR "assignment count mismatch " */ ()
24+ a = f2 /* ERROR "cannot assign [1-9]+ values to [1-9]+ variables " */ ()
2525 a, b = f2()
26- a, b, c = f2 /* ERROR "assignment count mismatch " */ ()
26+ a, b, c = f2 /* ERROR "cannot assign [1-9]+ values to [1-9]+ variables " */ ()
2727 a, b, c = f3()
28- a, b = f3 /* ERROR "assignment count mismatch " */ ()
28+ a, b = f3 /* ERROR "cannot assign [1-9]+ values to [1-9]+ variables " */ ()
2929
30- a, b, c = <- /* ERROR "assignment count mismatch " */ ch
30+ a, b, c = <- /* ERROR "cannot assign [1-9]+ values to [1-9]+ variables " */ ch
3131
3232 return /* ERROR "wrong number of return values" */
3333 return /* ERROR "wrong number of return values" */ 1
@@ -43,7 +43,7 @@ func assignments1() {
4343 c = s /* ERROR "cannot use .* in assignment" */
4444 s = b /* ERROR "cannot use .* in assignment" */
4545
46- v0, v1, v2 := 1 /* ERROR "mismatch " */ , 2, 3, 4
46+ v0, v1, v2 := 1 /* ERROR "cannot initialize " */ , 2, 3, 4
4747 _, _, _ = v0, v1, v2
4848
4949 b = true
@@ -108,20 +108,20 @@ func assignments2() {
108108 s, b = m["foo"]
109109 _, d = m["bar"]
110110 m["foo"] = nil
111- m["foo"] = nil /* ERROR assignment count mismatch */ , false
111+ m["foo"] = nil /* ERROR cannot assign [1-9]+ values to [1-9]+ variables */ , false
112112 _ = append(m["foo"])
113113 _ = append(m["foo"], true)
114114
115115 var c chan int
116116 _, b = <-c
117117 _, d = <-c
118118 <- /* ERROR cannot assign */ c = 0
119- <-c = 0 /* ERROR assignment count mismatch */ , false
119+ <-c = 0 /* ERROR cannot assign [1-9]+ values to [1-9]+ variables */ , false
120120
121121 var x interface{}
122122 _, b = x.(int)
123123 x /* ERROR cannot assign */ .(int) = 0
124- x.(int) = 0 /* ERROR assignment count mismatch */ , false
124+ x.(int) = 0 /* ERROR cannot assign [1-9]+ values to [1-9]+ variables */ , false
125125
126126 assignments2 /* ERROR used as value */ () = nil
127127 int /* ERROR not an expression */ = 0
0 commit comments