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

Handle implicit permits in turbine #348

Closed
wants to merge 0 commits into from
Closed

Conversation

copybara-service[bot]
Copy link

Handle implicit permits in turbine

If the declaration of a sealed class C lacks a permits clause, then the permitted direct subclasses of C are as follows:

If C is not an enum class, then its permitted direct subclasses are those classes declared in the same compilation unit as C (§7.3) which have a canonical name (§6.7) and whose direct superclass is C.

That is, the permitted direct subclasses are inferred as the classes in the same compilation unit that specify C as their direct superclass. The requirement for a canonical name means that no local classes or anonymous classes will be considered.

https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.1.1.2

@copybara-service copybara-service bot closed this Oct 24, 2024
@copybara-service copybara-service bot deleted the test_main_689011907 branch October 24, 2024 14:59
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

Successfully merging this pull request may close these issues.

0 participants