You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
module Test {
exports a.b;
requires static java.base;
}
As per the spec, it is illegal for modifiers to appear here. Same goes for transitive as well. Here's the text from 7.7.1: If the declaration of a module expresses a dependence on the java.base module, and the module is not itself java.base, then it is a compile-time error if a modifier appears after the requires keyword.
The text was updated successfully, but these errors were encountered:
Ouch! Thanks for bringing it up, Stephan! I will remove the milestone and keep the PR just in case they change their mind again :)
Strictly speaking the error would be correct for existing Java versions, but if you don't want to iterate on this several times, then yes, waiting until the spec for JEP 494 stabilizes sounds like a good idea :)
Consider this code:
As per the spec, it is illegal for modifiers to appear here. Same goes for transitive as well. Here's the text from 7.7.1:
If the declaration of a module expresses a dependence on the java.base module, and the module is not itself java.base, then it is a compile-time error if a modifier appears after the requires keyword.
The text was updated successfully, but these errors were encountered: