[Improvement]: Provide code actions to fix non-private mutable fields #42314
Labels
Area/CodeAction
Language Server Code Actions
Team/LanguageServer
Language Server Implementation related issues. #Compiler
Type/Improvement
Description
The fix for the diagnostic
invalid non-private mutable field in an 'isolated' object(BCE3956)
is straightforward, as we have to make the field private or make the field immutable. It would be convenient for a user if we could provide a code action as a quick fix for this use case.Describe your problem(s)
No response
Describe your solution(s)
Consider the following source code with the respective diagnostic.
FIX1: Allow the user to make the variable private.
FIX2: Allow the user to make the variable immutable by making it
final
andreadonly
.Related area
-> Compilation
Related issue(s) (optional)
#28681
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: