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-classes] Incorrect unused import warning #1808
Comments
Fixes eclipse-jdt#1808 The issue happens for imports used in the permits clause when that import is - declared as a nested class - is used only in a permits clause The fix checks if member types are imported and marks the import as used.
Fixes eclipse-jdt#1808 The issue happens for imports used in the permits clause when that import is - declared as a nested class - is used only in a permits clause The fix checks if member types are imported and marks the import as used. Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
The unused import warning is a red-herring. Real problem is this code should not compile but does:
|
Fixes eclipse-jdt#1808 The issue happens for imports used in the permits clause when that import is - declared as a nested class - is used only in a permits clause The fix checks if member types are imported and marks the import as used. Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
Fixes eclipse-jdt#1808 The issue happens for imports used in the permits clause when that import is - declared as a nested class - is used only in a permits clause The fix checks if member types are imported and marks the import as used. Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
@srikanth-sankaran @jukzi @akurtakov I have updated #1809 |
Fixes eclipse-jdt#1808 The issue happens for imports used in the permits clause when that import is - declared as a nested class - is used only in a permits clause The fix checks if member types are imported and marks the import as used. Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
Fixes eclipse-jdt#1808 The issue happens for imports used in the permits clause when that import is - declared as a nested class - is used only in a permits clause The fix checks if member types are imported and marks the import as used. Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
Fixes eclipse-jdt#1808 The issue happens for imports used in the permits clause when that import is - declared as a nested class - is used only in a permits clause The fix checks if member types are imported and marks the import as used. Signed-off-by: Snjezana Peco <snjezana.peco@redhat.com>
Please check with the original owner before reassigning. The proposed PR looks too much of a point fix - Is this fix required in a hurry ? I am planning a comprehensive review and rewrite of sealed classes support in the 4.32 M3 time frame. Basically the permitted classes clauses are resolved in the wrong phase. My comment above repeated here: The unused import warning is a red-herring. Real problem is this code should not compile but does:
hold a clue to the solution. |
Added several review comments to the PR - If this is not super urgent, please feel free to assign it back to me. Thanks! |
The original issue: redhat-developer/vscode-java#3446
Steps to reproduce:
The JDT compiler reports
The text was updated successfully, but these errors were encountered: