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

whitespace no longer allowed in func decl #453

gopherbot opened this issue Dec 23, 2009 · 1 comment

whitespace no longer allowed in func decl #453

gopherbot opened this issue Dec 23, 2009 · 1 comment


Copy link

by kq1quick:

Before filing a bug, please check whether it has been fixed since
the latest release: run "hg pull -u" and retry what you did to
reproduce the problem.  Thanks.

What steps will reproduce the problem?
1. Create the following program:

package mods
type s struct { x int }
func (a* s)
modS(newx int) { a.x = newx }

2. 8g compile the above

What is the expected output? What do you see instead?

With 8g prior to the Dec 22 release, this builds fine.
With the Dec 22 release, the following error is reported:
s3.go:3: syntax error near s

What is your $GOOS?  $GOARCH?

$ echo $GOOS
$ echo $GOARCH

Which revision are you using?  (hg identify)

$ hg identify
02ea3f16b8fc+ tip

The local modifications are to allow successful build and don't impact 
this bug; have attached hg diff to validate this.


  1. go.diff (1065 bytes)
Copy link

rsc commented Dec 23, 2009

Comment 1:

Yes, this is a consequence of the new semicolon rules.
You can convert old code by running
gofmt -oldparser -w *.go

Owner changed to

Status changed to WontFix.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
@rsc rsc removed their assignment Jun 22, 2022
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
None yet

No branches or pull requests

2 participants