ballerina-lang icon indicating copy to clipboard operation
ballerina-lang copied to clipboard

Provide code actions to fix the invalid access of mutable storage in an isolated function

Open nipunayf opened this issue 1 year ago • 0 comments

Purpose

$title.

Fixes #42331

Approach

Modified the existing add isolated qualifier and make variable immutable code actions to fix the diagnostic invalid access of mutable storage in an 'isolated' function (BCE3943).

Samples

Make the variable immutable

https://github.com/ballerina-platform/ballerina-lang/assets/59343084/4fac9457-6995-449b-bd17-908e57dd59df

Make the variable isolated

https://github.com/ballerina-platform/ballerina-lang/assets/59343084/3c14a4c0-784b-4bb5-99d5-46ee2310400f

Check List

  • [x] Read the Contributing Guide
  • [ ] Updated Change Log
  • [ ] Checked Tooling Support (#<Issue Number>)
  • [x] Added necessary tests
    • [x] Unit Tests
    • [ ] Spec Conformance Tests
    • [ ] Integration Tests
    • [ ] Ballerina By Example Tests
  • [ ] Increased Test Coverage
  • [ ] Added necessary documentation
    • [ ] API documentation
    • [ ] Module documentation in Module.md files
    • [ ] Ballerina By Examples

nipunayf avatar May 08 '24 10:05 nipunayf