mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
Conflicts: - test/fixedbugs/issue27595.go - test/fixedbugs/issue30087.go - test/used.go Merge List: + 2020-12-2807569dac4e[dev.regabi] all: merge master (1d78139) into dev.regabi + 2020-12-2876136be027[dev.regabi] cmd/compile: check for recursive import in ImportBody + 2020-12-28fda7ec3a3f[dev.regabi] cmd/compile: remove Name.IsDDD, etc + 2020-12-28098a6490b9[dev.regabi] cmd/compile: remove Declare in makepartialcall + 2020-12-28137f0d2e06[dev.regabi] cmd/compile: remove unnecessary Name.Sym call + 2020-12-283383b5c74a[dev.regabi] cmd/compile: flatten dependency graph [generated] + 2020-12-28f8afb8216a[dev.regabi] cmd/compile: rename CommStmt and CaseStmt [generated] + 2020-12-285f3bd59a0d[dev.regabi] cmd/compile: remove some unneeded code in package ir + 2020-12-283bdafb0d82[dev.regabi] cmd/compile: remove CommStmt.List + 2020-12-282ecf52b841[dev.regabi] cmd/compile: separate CommStmt from CaseStmt + 2020-12-28ed9772e130[dev.regabi] cmd/compile: add explicit file name in types generation + 2020-12-28a59d26603f[dev.regabi] cmd/compile: use []*CaseStmt in {Select,Switch}Stmt + 2020-12-28fbc4458c06[dev.regabi] cmd/compile: simplify some tree traversal code + 2020-12-286c67677541[dev.regabi] cmd/compile: simplify FuncName and PkgFuncName + 2020-12-28676d794b81[dev.regabi] cmd/compile: remove refersToCommonName + 2020-12-28c98548e110[dev.regabi] cmd/compile: merge ascompatee, ascompatee1, and reorder3 + 2020-12-284c215c4fa9[dev.regabi] cmd/compile: simplify and optimize reorder3 + 2020-12-28e6c973198d[dev.regabi] cmd/compile: stop mangling SelectorExpr.Sel for ODOTMETH + 2020-12-28135ce1c485[dev.regabi] cmd/compile: desugar OMETHEXPR into ONAME during walk + 2020-12-280f732f8c91[dev.regabi] cmd/compile: minor walkExpr cleanups + 2020-12-280de8eafd98[dev.regabi] cmd/compile: remove SelectorExpr.Offset field + 2020-12-28a4f335f420[dev.regabi] cmd/compile: always use a Field for ODOTPTR expressions + 2020-12-261d78139128runtime/cgo: fix Android build with NDK 22 + 2020-12-252018b68a65net/mail: don't use MDT in test + 2020-12-25e4f293d853[dev.regabi] cmd/compile: fix OCALLMETH desugaring + 2020-12-251d9a1f67d5[dev.regabi] cmd/compile: don't emit reflect data for method types + 2020-12-25396b6c2e7c[dev.regabi] cmd/compile: cleanup assignment typechecking + 2020-12-25e24d2f3d05[dev.regabi] cmd/compile: remove typ from RangeStmt + 2020-12-252785c691c2[dev.regabi] cmd/compile: cleanup devirtualization docs + 2020-12-254b1d0fe66f[dev.regabi] cmd/compile: new devirtualization pkg [generated] + 2020-12-24082cc8b7d9[dev.regabi] cmd/compile: change ir.IsAssignable -> ir.IsAddressable + 2020-12-2427b248b307[dev.regabi] cmd/compile: separate range stmt Vars to Key, Value nodes + 2020-12-2340818038bf[dev.regabi] cmd/compile: change CaseStmt.Vars to Var + 2020-12-23b116404444runtime: shift timeHistogram buckets and allow negative durations + 2020-12-238db7e2fecdruntime: fix allocs-by-size and frees-by-size buckets + 2020-12-23fb96f07e1aruntime: fix nStackRoots comment about stack roots + 2020-12-23d1502b3c72lib/time, time/tzdata: update tzdata to 2020e + 2020-12-2330c99cbb7acmd/go: add the Retract field to 'go help mod edit' definition of the GoMod struct + 2020-12-2349d0b239cbdoc: fix a typo in contribute.html + 2020-12-239eeed291bc[dev.regabi] cmd/compile: eliminate usage of ir.Node in liveness + 2020-12-23d1d64e4cea[dev.regabi] cmd/compile: split SliceExpr.List into separate fields + 2020-12-2398a73030b0cmd/go: in 'go get', promote named implicit dependencies to explicit + 2020-12-23d19018e8f1[dev.regabi] cmd/compile: split SliceHeaderExpr.LenCap into separate fields + 2020-12-2353f082b0ee[dev.regabi] cmd/compile: cleanup export code further + 2020-12-2331267f82e1[dev.regabi] cmd/compile: simplify function/interface/struct typechecking + 2020-12-23addade2cce[dev.regabi] cmd/compile: prefer types constructors over typecheck + 2020-12-2318ebfb49e9[dev.regabi] cmd/compile: cleanup noder + 2020-12-2387a592b356[dev.regabi] cmd/compile: cleanup import/export code + 2020-12-235898025026[dev.regabi] cmd/compile: update mkbuiltin.go to use new type constructors + 2020-12-2363c96c2ee7[dev.regabi] cmd/compile: update mkbuiltin.go and re-enable TestBuiltin + 2020-12-23fd6ba1c8a2os/signal: fix a deadlock with syscall.AllThreadsSyscall() use + 2020-12-23b0b0d98283runtime: linux iscgo support for not blocking nptl signals + 2020-12-22223331fc0ccmd/go/internal/modload: add hint for missing implicit dependency Change-Id: Iecb8a7dfb401b6ab383e97101cd81bfc201683f6
19 lines
624 B
Go
19 lines
624 B
Go
// 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 main
|
|
|
|
var a = twoResults() // ERROR "assignment mismatch: 1 variable but twoResults returns 2 values|2\-valued"
|
|
var b, c, d = twoResults() // ERROR "assignment mismatch: 3 variables but twoResults returns 2 values|cannot initialize"
|
|
var e, f = oneResult() // ERROR "assignment mismatch: 2 variables but oneResult returns 1 value|cannot initialize"
|
|
|
|
func twoResults() (int, int) {
|
|
return 1, 2
|
|
}
|
|
|
|
func oneResult() int {
|
|
return 1
|
|
}
|