-
Notifications
You must be signed in to change notification settings - Fork 136
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
[Sealed types] Proper sealing of hierarchy rejected in incremental builds if permitted class is generic #3488
Comments
I don't think these version numbers look right. This problem is not reproducible on Eclipse SDK 4.33 or 4.34 or on master/HEAD. I intend to close this as not reproducible. It is likely the Temurin build is using an ancient version of JDT plugins. |
@srikanth-sankaran |
@srikanth-sankaran I made an observation: if I clean the project the error is gone until I touch the affected file and save. After saving the error shows. |
Thanks for that tip - reproduced. Looks like a defect in incremental building. Investigating ... |
Works fine in 3.43. Mea cupla :-( |
class is generic * Fixes eclipse-jdt#3488
Thank you! |
The compiler incorrectly reports that a generic class is not a permitted subtype in a sealed class hierarchy, even when it's explicitly listed in the permits clause.
Minimal example to reproduce:
Expected behavior:
Actual behavior:
This appears to be a bug in handling generic type parameters within sealed class hierarchies.
Java version: 17 (Eclipse Temurin jdk-17.0.11+9)
Eclipse IDE for Eclipse Committers (includes Incubating components)
Version: 2024-12 (4.34.0)
Build id: 20241128-0757
The text was updated successfully, but these errors were encountered: