Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It is possible to assign a MutArray into an Array #2249

Closed
eladb opened this issue Apr 24, 2023 · 2 comments · Fixed by #2267
Closed

It is possible to assign a MutArray into an Array #2249

eladb opened this issue Apr 24, 2023 · 2 comments · Fixed by #2267
Assignees
Labels
🐛 bug Something isn't working 🛠️ compiler Compiler 🙋‍♀️ help wanted Extra attention is needed

Comments

@eladb
Copy link
Contributor

eladb commented Apr 24, 2023

I tried this

let a: Array<str> = MutArray<str>[];

I expected this:

To fail

Instead, this happened

It worked

Is there a workaround?

N/A

Component

Compiler

Wing Version

No response

Wing Console Version

No response

Node.js Version

No response

Platform(s)

No response

Anything else?

No response

Community Notes

  • 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.
@eladb eladb added the 🐛 bug Something isn't working label Apr 24, 2023
@Chriscbr Chriscbr added the 🛠️ compiler Compiler label Apr 24, 2023
@staycoolcall911
Copy link
Contributor

Another example of the same issue:

let f = inflight (): Array<str> => {
    return MutArray<str> [];
};

@mergify mergify bot closed this as completed in #2267 Apr 25, 2023
mergify bot pushed a commit that referenced this issue Apr 25, 2023
Fixes #2249

*By submitting this pull request, I confirm that my contribution is made under the terms of the [Monada Contribution License](https://docs.winglang.io/terms-and-policies/contribution-license.html)*.
@monadabot
Copy link
Contributor

Congrats! 🚀 This was released in Wing 0.13.26.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working 🛠️ compiler Compiler 🙋‍♀️ help wanted Extra attention is needed
Projects
Archived in project
Development

Successfully merging a pull request may close this issue.

4 participants