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

Closed
gopherbot opened this Issue Dec 23, 2009 · 1 comment

Comments

Projects
None yet
2 participants
@gopherbot

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
linux
$ echo $GOARCH
386

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.

Attachments:

  1. go.diff (1065 bytes)
@rsc

This comment has been minimized.

Show comment
Hide comment
@rsc

rsc Dec 23, 2009

Contributor

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 r...@golang.org.

Status changed to WontFix.

Contributor

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 r...@golang.org.

Status changed to WontFix.

@gopherbot gopherbot added the wontfix label Dec 23, 2009

@golang golang locked and limited conversation to collaborators Jun 24, 2016

This issue was closed.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.