winglang/wing

It is possible to assign a MutArray into an Array

eladb opened this issue · 2 comments

eladb commented

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.

Another example of the same issue:

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

Congrats! 🚀 This was released in Wing 0.13.26.