2018-08-24 13:37:25 -06:00
|
|
|
// errorcheck
|
|
|
|
|
|
|
|
// Copyright 2018 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.
|
|
|
|
|
|
|
|
package p
|
|
|
|
|
2018-09-15 05:04:59 -06:00
|
|
|
var x int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values"
|
2018-08-24 13:37:25 -06:00
|
|
|
|
|
|
|
func f() {
|
2018-09-15 05:04:59 -06:00
|
|
|
var _ int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values"
|
|
|
|
var a int = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values"
|
|
|
|
a = three() // ERROR "assignment mismatch: 1 variable but three returns 3 values"
|
|
|
|
b := three() // ERROR "assignment mismatch: 1 variable but three returns 3 values"
|
2018-08-24 13:37:25 -06:00
|
|
|
|
|
|
|
_, _ = a, b
|
|
|
|
}
|
|
|
|
|
|
|
|
func three() (int, int, int)
|