Can't use self
of a readonly
or isolated
object as a captured variable in an isolated
function
#40296
Labels
Lang/ClassDefinition
issues related to classes
Lang/ModuleVarDecl/Isolated
issues related to isolated variables
Lang/Readonly
Type `readonly` related issues
Team/CompilerFE
All issues related to Language implementation and Compiler, this exclude run times.
Type/Task
Milestone
Description
The following program gives a compile time error.
But it should work.
Workaround: Assign the affected field locally and pass that to the closure.
Steps to Reproduce
No response
Affected Version(s)
No response
OS, DB, other environment details and versions
No response
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: