mirror of
https://github.com/golang/go
synced 2024-11-16 19:14:43 -07:00
a8fe098a12
Conflicts: - src/cmd/compile/internal/gc/main.go - test/fixedbugs/issue15055.go Merge List: + 2021-01-0577365c5ed7
[dev.regabi] cmd/compile: add Name.Canonical and move Byval + 2021-01-05e09783cbc0
[dev.regabi] cmd/compile: make ir.StaticValue safer + 2021-01-059aa950c407
[dev.regabi] cmd/compile: make ir.OuterValue safer + 2021-01-05eb626409d1
[dev.regabi] cmd/compile: simplify CaptureVars + 2021-01-05c28ca67a96
[dev.regabi] cmd/compile: fix ir.Dump for []*CaseClause, etc + 2021-01-04f24e40c14a
[dev.regabi] cmd/compile: remove Name.Class_ accessors + 2021-01-04d89705e087
[dev.regabi] cmd/compile: fix re-export of parameters + 2021-01-04290b4154b7
[dev.regabi] cmd/compile: fix ICE due to large uint64 constants + 2021-01-04a30fd52884
[dev.regabi] cmd/compile: use ir.NewNameAt in SubstArgTypes + 2021-01-038fc44cf0fa
[dev.regabi] cmd/compile: remove a couple CloneName calls + 2021-01-03907a4bfdc7
[dev.regabi] cmd/compile: fix map assignment order + 2021-01-03f2e6dab048
[dev.regabi] cmd/compile: remove walkReturn "common case" path + 2021-01-03d36a6bf44d
[dev.regabi] cmd/compile: improve walkReturn common case + 2021-01-03a317067d65
[dev.regabi] cmd/compile: improve ascompatee + 2021-01-035d80a590a2
[dev.regabi] cmd/compile: simplify walkReturn + 2021-01-03bb1b6c95c2
[dev.regabi] cmd/compile: remove Node.{,Set}Walkdef + 2021-01-0357c426c9a5
[dev.regabi] cmd/compile: tighten typecheckdef to *ir.Name + 2021-01-03b1747756e3
[dev.regabi] cmd/compile: reorganize escape analysis somewhat + 2021-01-02f2538033c0
[dev.regabi] cmd/compile: remove Nodes.Set [generated] + 2021-01-022f2d4b4e68
[dev.regabi] cmd/compile: remove {Ptr,Set}Init from Node interface + 2021-01-011544a03198
[dev.regabi] cmd/compile: refactor redundant type conversion [generated] + 2021-01-017958a23ea3
[dev.regabi] cmd/compile: use *ir.Name where possible in inl.go + 2021-01-01bfa97ba48f
[dev.regabi] test: add another closure test case + 2021-01-0167ad695416
[dev.regabi] cmd/compile: split escape analysis state + 2021-01-01fad9a8b528
[dev.regabi] cmd/compile: simplify inlining of closures + 2021-01-017d55669847
[dev.regabi] cmd/compile: simplify dwarfgen.declPos + 2021-01-019ed1577779
[dev.regabi] cmd/compile: remove Func.ClosureEnter + 2021-01-01ece345aa69
[dev.regabi] cmd/compile: expand documentation for Func.Closure{Vars,Enter} + 2021-01-016ddbc75efd
[dev.regabi] cmd/compile: earlier deadcode removal + 2021-01-0168e6fa4f68
[dev.regabi] cmd/compile: fix package-initialization order + 2021-01-013a4474cdfd
[dev.regabi] cmd/compile: some more manual shuffling + 2021-01-010f1d2129c4
[dev.regabi] cmd/compile: reshuffle type-checking code [generated] + 2021-01-01b8fd3440cd
[dev.regabi] cmd/compile: report unused variables during typecheck + 2021-01-01fd22df9905
[dev.regabi] cmd/compile: remove idempotent Name() calls [generated] + 2020-12-31dfbcff80c6
[dev.regabi] cmd/compile: make copyExpr return *ir.Name directly + 2020-12-3177fd81a3e6
[dev.regabi] cmd/compile: use names for keep alive variables in function call + 2020-12-318fe1197654
[dev.regabi] cmd/compile: remove Name.orig + 2020-12-31477b049060
[dev.regabi] cmd/compile: fix printing of method expressions + 2020-12-30178c667db2
[dev.regabi] cmd/compile: fix OSLICEARR comments + 2020-12-30f0d99def5b
[dev.regabi] cmd/compile: add newline to ir.Dump + 2020-12-30451693af71
[dev.regabi] cmd/compile: simplify typecheckdef + 2020-12-300c1a899a6c
[dev.regabi] cmd/compile: fix defined-pointer method call check + 2020-12-30f9b67f76a5
[dev.regabi] cmd/compile: change ir.DoChildren to use bool result type + 2020-12-30499851bac8
[dev.regabi] cmd/compile: generalize ir/mknode.go + 2020-12-3082ab3d1448
[dev.regabi] cmd/compile: use *ir.Name for Decl.X + 2020-12-309958b7ed3e
[dev.regabi] cmd/compile: unexport ir.FmtNode + 2020-12-29f5816624cd
[dev.regabi] cmd/compile: change AddrExpr.Alloc to AddrExpr.Prealloc + 2020-12-29850aa7c60c
[dev.regabi] cmd/compile: use *ir.Name instead of ir.Node for CaseClause.Var + 2020-12-2937babc97bb
[dev.regabi] cmd/compile: allow visitor visits *ir.Name + 2020-12-295cf3c87fa6
[dev.regabi] cmd/compile: generate case/comm clause functions in mknode.go + 2020-12-29b3e1ec97fd
[dev.regabi] cmd/compile: move new addrtaken bit back to the old name + 2020-12-290620c674dd
[dev.regabi] cmd/compile: remove original addrtaken bit + 2020-12-290523d525ae
[dev.regabi] cmd/compile: separate out address taken computation from typechecker + 2020-12-299ea272e5ec
[dev.regabi] cmd/compile: simplify ir.Func somewhat + 2020-12-29e40cb4d4ae
[dev.regabi] cmd/compile: remove more unused code + 2020-12-296f30c95048
[dev.regabi] cmd/compile: remove unneeded indirection + 2020-12-29171fc6f223
[dev.regabi] cmd/compile: remove workarounds for go/constant issues + 2020-12-2933801cdc62
[dev.regabi] cmd/compile: use Ntype where possible + 2020-12-2982ad3083f8
[dev.regabi] cmd/compile: remove typ from AssignOpStmt + 2020-12-29e34c44a7c4
[dev.regabi] cmd/compile: refactoring typecheck arith + 2020-12-29a5ec920160
[dev.regabi] cmd/compile: more Linksym cleanup + 2020-12-29ec59b197d5
[dev.regabi] cmd/compile: rewrite to use linksym helpers [generated] + 2020-12-2925c613c02d
[dev.regabi] cmd/compile: add Linksym helpers + 2020-12-29289da2b33e
[dev.regabi] cmd/compile: move Node.Opt to Name + 2020-12-296acbae4fcc
[dev.regabi] cmd/compile: address some ir TODOs + 2020-12-294629f6a51d
[dev.regabi] cmd/compile: merge {Selector,CallPart,Method}Expr + 2020-12-29e563715b30
[dev.regabi] cmd/compile: remove Sym.Importdef + 2020-12-293f370b75fb
[dev.regabi] cmd/compile: cleanup //go:generate directives Change-Id: Ibb254630924ac5873ebda6762ceb066f54a82649
20 lines
1.1 KiB
Go
20 lines
1.1 KiB
Go
// errorcheck
|
|
|
|
// Copyright 2016 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
|
|
|
|
func main() {
|
|
type name string
|
|
_ = []byte("abc", "def", 12) // ERROR "too many arguments (to conversion to \[\]byte: \(\[\]byte\)\(.abc., .def., 12\))?"
|
|
_ = string("a", "b", nil) // ERROR "too many arguments (to conversion to string: string\(.a., .b., nil\))?"
|
|
_ = []byte() // ERROR "missing argument (to conversion to \[\]byte: \(\[\]byte\)\(\))?"
|
|
_ = string() // ERROR "missing argument (to conversion to string: string\(\))?"
|
|
_ = *int() // ERROR "missing argument (to conversion to int: int\(\))?"
|
|
_ = (*int)() // ERROR "missing argument (to conversion to \*int: \(\*int\)\(\))?"
|
|
_ = name("a", 1, 3.3) // ERROR "too many arguments (to conversion to name: name\(.a., 1, 3.3\))?"
|
|
_ = map[string]string(nil, nil) // ERROR "too many arguments (to conversion to map\[string\]string: \(map\[string\]string\)\(nil, nil\))?"
|
|
}
|