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

slc = append(slc, ) pass compile #31400

Closed
northfun opened this issue Apr 11, 2019 · 2 comments
Closed

slc = append(slc, ) pass compile #31400

northfun opened this issue Apr 11, 2019 · 2 comments

Comments

@northfun
Copy link

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

$ go version
go 1.12

Does this issue reproduce with the latest release?

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

go env Output
$ go env

What did you do?

code as this:

tars = append(tars, ) 

What did you expect to see?

compile err.
I wonder why it is designed to pass well,it does nothing but mostly would be a typo,shouldn't it be found early?

What did you see instead?

go-fmt pass, compile pass

@cuonglm
Copy link
Member

cuonglm commented Apr 11, 2019

I think it works as expected, a variadic arguments can be zero or more.

@northfun
Copy link
Author

Sorry, I find go-fmt removes the last comma.

@golang golang locked and limited conversation to collaborators Apr 10, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants