[Epic] Code actions for isolated
constructs
#28681
Labels
Area/CodeAction
Language Server Code Actions
Team/LanguageServer
Language Server Implementation related issues. #Compiler
Type/Improvement
Milestone
Description:
Few suggestions for potential code actions for
isolated
constructs,isolated
variable can only be accessed within alock
statement.This fails with
invalid access of an 'isolated' variable outside a 'lock' statement
, and can be fixed using alock
statement. Can we provide a code action to do the same?This is also the case for accessing
self
in anisolated
class.isolated
class that is notfinal
and/or does not have a type that is a subtype ofreadonly
needs to beprivate
.can be fixed by making it a
private
field.isolated
function can access variables defined outside the function only if it is either anisolated
variable or if it is a variable that is bothfinal
and has a subtype ofreadonly
.Can we provide a code action for at least marking a variable as an
isolated
variable?Can be fixed either by doing
or
Affected Versions:
slalpha2
The text was updated successfully, but these errors were encountered: