Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

cmd/compile: align formal parameters with actual argument when reporting incorrect number of arguments #34138

Open
tumdum opened this issue Sep 6, 2019 · 2 comments

Comments

@tumdum
Copy link

commented Sep 6, 2019

What version of Go are you using (go version)?

$ go version
go version go1.13 linux/amd64

Does this issue reproduce with the latest release?

yes

What operating system and processor architecture are you using (go env)?

go env Output
$ go env
GO111MODULE=""
GOARCH="amd64"
GOBIN=""
GOCACHE="/home/klak/.cache/go-build"
GOENV="/home/klak/.config/go/env"
GOEXE=""
GOFLAGS=""
GOHOSTARCH="amd64"
GOHOSTOS="linux"
GONOPROXY=""
GONOSUMDB=""
GOOS="linux"
GOPATH="/home/klak"
GOPRIVATE=""
GOPROXY="https://proxy.golang.org,direct"
GOROOT="/usr/local/go"
GOSUMDB="sum.golang.org"
GOTMPDIR=""
GOTOOLDIR="/usr/local/go/pkg/tool/linux_amd64"
GCCGO="gccgo"
AR="ar"
CC="gcc"
CXX="g++"
CGO_ENABLED="1"
GOMOD=""
CGO_CFLAGS="-g -O2"
CGO_CPPFLAGS=""
CGO_CXXFLAGS="-g -O2"
CGO_FFLAGS="-g -O2"
CGO_LDFLAGS="-g -O2"
PKG_CONFIG="pkg-config"
GOGCCFLAGS="-fPIC -m64 -pthread -fmessage-length=0 -fdebug-prefix-map=/tmp/go-build664638301=/tmp/go-build -gno-record-gcc-switches"

What did you do?

https://play.golang.org/p/Jgg2p681cOG

What did you expect to see?

./prog.go:7:5: not enough arguments in call to foo
	have (number, number, number, number)
	want (int,    int,    int,    int, int, int)

What did you see instead?

./prog.go:7:5: not enough arguments in call to foo
	have (number, number, number, number)
	want (int, int, int, int, int, int)

@ianlancetaylor ianlancetaylor changed the title Align formal parameters with actual argument when reporting incorrect number of arguments cmd/compile: align formal parameters with actual argument when reporting incorrect number of arguments Sep 6, 2019

@ianlancetaylor ianlancetaylor added this to the Unplanned milestone Sep 6, 2019

@ianlancetaylor

This comment has been minimized.

Copy link
Contributor

commented Sep 6, 2019

@griesemer

This comment has been minimized.

Copy link
Contributor

commented Sep 6, 2019

There may be better ways to report this error, but aligning the output will only cause more problems (one can easily imagine overlong lines that are harder to decipher than what's here now).

Not urgent.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.