Bug 576380 - [quick-fix] Add quick fix for A type declaration [...] that has a permits clause should have a sealed modifier
Summary: [quick-fix] Add quick fix for A type declaration [...] that has a permits cla...
Status: NEW
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 4.21   Edit
Hardware: PC Windows 10
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: JDT-Core-Inbox CLA
QA Contact:
URL:
Whiteboard: stalebug
Keywords:
Depends on:
Blocks:
 
Reported: 2021-10-01 04:17 EDT by Lukas Eder CLA
Modified: 2023-09-22 00:28 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Lukas Eder CLA 2021-10-01 04:17:39 EDT
In this code:

// ------------------------------------
package p;

interface I permits J {}
record J() implements I {}
// ------------------------------------

There's an obvious missing sealed keyword on the interface I. The compiler reports:

> A type declaration I that has a permits clause should have a sealed modifier

But I'm not getting any quick fix offer to add the keyword, which would be nice. Related quick fixes have been added in the past, e.g.:

- https://bugs.eclipse.org/bugs/show_bug.cgi?id=564834
- https://bugs.eclipse.org/bugs/show_bug.cgi?id=565420

... but this one doesn't work

I'm using Eclipse JDT (Java Development Tools) Patch with Java 17 support for 2021-09 development stream 1.2.200.v20210914-1442_BETA_JAVA17
Comment 1 Eclipse Genie CLA 2023-09-22 00:28:01 EDT
This bug hasn't had any activity in quite some time. Maybe the problem got resolved, was a duplicate of something else, or became less pressing for some reason - or maybe it's still relevant but just hasn't been looked at yet.

If you have further information on the current state of the bug, please add it. The information can be, for example, that the problem still occurs, that you still want the feature, that more information is needed, or that the bug is (for whatever reason) no longer relevant.

--
The automated Eclipse Genie.