wing icon indicating copy to clipboard operation
wing copied to clipboard

Add Compiler Error When Attempting To Mutate Immutable Containers

Open hasanaburayyan opened this issue 2 years ago • 3 comments

Community Note

Please vote by adding a 👍 reaction to the issue to help us prioritize. If you are interested to work on this issue, please leave a comment.

Feature Spec

Right now its not possible to mutate immutable container types because the API's for set method does not exist. So when attempting to do something like:

let m1 = Map<str> {"a" => "hello"};

m1.set("a", "world");

The wingc error message will say Unknown symbol "set" However the DX would be better if it was something like cannot mutate immutable type "Map"

Use Cases

Enhance DX when attempting to mutate immutable containers

Implementation Notes

No response

Component

No response

hasanaburayyan avatar Feb 24 '23 11:02 hasanaburayyan

Hi,

This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

github-actions[bot] avatar Apr 26 '23 06:04 github-actions[bot]

Hi,

This issue hasn't seen activity in 60 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

github-actions[bot] avatar Jul 12 '23 06:07 github-actions[bot]

Hi,

This issue hasn't seen activity in 90 days. Therefore, we are marking this issue as stale for now. It will be closed after 7 days. Feel free to re-open this issue when there's an update or relevant information to be added. Thanks!

github-actions[bot] avatar May 07 '24 06:05 github-actions[bot]