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
Assignees
Milestone

Comments

@scabug
Copy link

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
Copy link
Author

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
Copy link
Author

scabug commented Jun 19, 2012

@adriaanm said:
scala/scala#723

@scabug scabug closed this as completed 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
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants