-
Notifications
You must be signed in to change notification settings - Fork 801
Open
Labels
Team/CompilerFEAll issues related to Language implementation and Compiler, this exclude run times.All issues related to Language implementation and Compiler, this exclude run times.Type/BuguserCategory/Compilation
Description
Description
When a configurable variable is defined with the following type, it is identified as a mutable storage, and the compiler complains when we try to assign it to a record field default value.
Steps to Reproduce
Check the below code:
configurable string|string[]? fooConfig = ();
type Foo record {|
string|string[]? foo = fooConfig;
|};The error can be avoided when defined as a readonly varoable:
configurable readonly & (string|string[]?) fooConfig = ();
type Foo record {|
string|string[]? foo = fooConfig;
|};Affected Version(s)
2201.12.9
OS, DB, other environment details and versions
No response
Related area
-> Compilation
Related issue(s) (optional)
Suggested label(s) (optional)
No response
Suggested assignee(s) (optional)
No response
Metadata
Metadata
Assignees
Labels
Team/CompilerFEAll issues related to Language implementation and Compiler, this exclude run times.All issues related to Language implementation and Compiler, this exclude run times.Type/BuguserCategory/Compilation