]> Cypherpunks.ru repositories - gostls13.git/blob - test/fixedbugs/issue30087.go
[dev.typeparams] all: merge dev.regabi (07569da) into dev.typeparams
[gostls13.git] / test / fixedbugs / issue30087.go
1 // errorcheck
2
3 // Copyright 2019 The Go Authors. All rights reserved.
4 // Use of this source code is governed by a BSD-style
5 // license that can be found in the LICENSE file.
6
7 package main
8
9 func main() {
10         var a, b = 1    // ERROR "assignment mismatch: 2 variables but 1 value|wrong number of initializations|cannot initialize"
11         _ = 1, 2        // ERROR "assignment mismatch: 1 variable but 2 values|number of variables does not match|cannot assign"
12         c, d := 1       // ERROR "assignment mismatch: 2 variables but 1 value|wrong number of initializations|cannot initialize"
13         e, f := 1, 2, 3 // ERROR "assignment mismatch: 2 variables but 3 values|wrong number of initializations|cannot initialize"
14         _, _, _, _ = c, d, e, f
15 }