-
Notifications
You must be signed in to change notification settings - Fork 139
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
[Records] ECJ doesn't allow record declarations in module-info.java #3347
Comments
I have disabled this test as it encodes wrong behavior:
|
"Allows" may be a bit too strong. JLS rarely speaks of file names, much in this area is left to the "host system". The grammar for modular compilation units is
No Interestingly, the only mention of the name
Interestingly the same source code is accepted by ecj when stored in a file I was wondering if we should help users to avoid such nonsense, but then I noticed that ecj already accepts normal classes in <shrug/> |
I may have extrapolated from my recollection of how normal code is accepted in package-info.java and seeing how javac behaves with module-info So yes my original statement may be more categorical than warranted. |
For good or bad, JLS allows this. We should not reject
$ cat module-info.java
record R() {}
but we do.
The text was updated successfully, but these errors were encountered: