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

Java parser rejects useless semicolon in syntactically correct Java code #5910

Closed
scabug opened this issue Jun 14, 2012 · 2 comments
Closed

Java parser rejects useless semicolon in syntactically correct Java code #5910

scabug opened this issue Jun 14, 2012 · 2 comments
Assignees
Milestone

Comments

@scabug
Copy link

@scabug scabug commented Jun 14, 2012

The following code is rejected by the Scala compiler:

// J.java
public class Bar {  
};

Results in:

javasrc/javatest/Bar.java:5: error: illegal start of type declaration
};
  ^

According to the Java spec, ; is legal in a type declaration list:

http://docs.oracle.com/javase/specs/jls/se7/html/jls-7.html#jls-7.6

The more serious issue is that the Scala compiler stops as soon as it finds syntax errors, so no errors are reported in Scala sources that come afterwards.

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Jun 14, 2012

Imported From: https://issues.scala-lang.org/browse/SI-5910?orig=1
Reporter: @dragos
Affected Versions: 2.9.2, 2.10.0

@scabug

This comment has been minimized.

Copy link
Author

@scabug scabug commented Jun 19, 2012

@scabug scabug closed this Jun 19, 2012
@scabug scabug added this to the 2.10.0 milestone Apr 7, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked pull requests

Successfully merging a pull request may close this issue.

None yet
2 participants
You can’t perform that action at this time.