[Task]: Require locks when assigning to a field of an isolated object in the init
method after all the fields have been initialized
#41043
Labels
Priority/High
Team/CompilerFE
All issues related to Language implementation and Compiler, this exclude run times.
Type/Task
Description
With the fix (#40757) for #40736, we will be making it an error when
self
of anisolated
object is accessed outside a lock statement other than to set a value for a field.But according to the spec, once all the fields are initialized, even subsequent assignments to fields need to happen within lock statements.
Given that not using locks here won't cause any correctness issues (since we require isolated expression when assigning anyway) and the task re-prioritization along with the extent of changes required (need to duplicate dataflow analyzer-like logic and address issues in the existing logic), we have deferred this for now.
Describe your task(s)
Related area
-> Compilation
Related issue(s) (optional)
No response
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
The text was updated successfully, but these errors were encountered: