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

Better compiler error for omitted semicolons #89

Closed
gopherbot opened this issue Nov 12, 2009 · 6 comments
Closed

Better compiler error for omitted semicolons #89

gopherbot opened this issue Nov 12, 2009 · 6 comments

Comments

@gopherbot
Copy link
Contributor

by peterbourgon:

As discussed in
http://groups.google.com/group/golang-nuts/browse_thread/thread/fb19a3649928aee/0e9713122a9e28eb
-- if Go continues to allow optional semicolons for one-line statements,
there should probably be a more specific diagnostic for this situation:

> s += " "
> s += " ";

than the generic and confusing

> foo.go:21: syntax error near s

which is what we get today.
@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 1:

Status changed to Accepted.

@rsc
Copy link
Contributor

rsc commented Nov 12, 2009

Comment 2:

Issue #118 has been merged into this issue.

@rsc
Copy link
Contributor

rsc commented Nov 15, 2009

Comment 3:

Owner changed to r...@golang.org.

Status changed to LongTerm.

@gopherbot
Copy link
Contributor Author

Comment 4 by Ivan.Volosyuk:

The compiler errors are rather misleading in general and only one compiler error is 
displayed. Say when using incorrect import syntax:
import (
    "os",
    "flag";
       )
I get:
remote.go:4: syntax error near uint8
Looks crazy. Looks like we have returned to a fortran66 stone age.

@rsc
Copy link
Contributor

rsc commented Nov 20, 2009

Comment 5:

Thanks for your constructive feedback.

@rsc
Copy link
Contributor

rsc commented Dec 11, 2009

Comment 6:

This issue was closed by revision 3997495.

Status changed to Fixed.

Merged into issue #-.

@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.
Projects
None yet
Development

No branches or pull requests

2 participants