mirror of
https://github.com/golang/go
synced 2024-11-24 21:00:09 -07:00
b77d9fe0ea
Keep left-to-right order when referring to the number of variables and values involved. Fixes #22159. Change-Id: Iccca12d3222f9d5e049939a9ccec07513c393faa Reviewed-on: https://go-review.googlesource.com/68690 Reviewed-by: Russ Cox <rsc@golang.org>
27 lines
466 B
Go
27 lines
466 B
Go
// errorcheck
|
|
|
|
// Copyright 2010 The Go Authors. All rights reserved.
|
|
// Use of this source code is governed by a BSD-style
|
|
// license that can be found in the LICENSE file.
|
|
|
|
// https://code.google.com/p/gofrontend/issues/detail?id=1
|
|
|
|
package main
|
|
|
|
func f1() {
|
|
a, b := f() // ERROR "assignment mismatch|does not match"
|
|
_ = a
|
|
_ = b
|
|
}
|
|
|
|
func f2() {
|
|
var a, b int
|
|
a, b = f() // ERROR "assignment mismatch|does not match"
|
|
_ = a
|
|
_ = b
|
|
}
|
|
|
|
func f() int {
|
|
return 1;
|
|
}
|