You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using List.Pop<L> with only one entry in the list, the resulting type is an empty list instead of the single element.
Reproduce the bug
// This throws a compiler errorconstinvalid: List.Pop<['key']>=['key'];// This worksconstvalid: List.Pop<['key']>=[];
Expected behavior
I would expect the type to behave similar to Array.pop(), and it's description lets one assume that it does, but the above example showcases that this is not the case.
Possible Solution
I'm currently testing out a solution for this, as soon as I have more insight I will update the issue.
Screenshots
Additional context
The text was updated successfully, but these errors were encountered:
🐞 Bug Report
Describe the bug
When using
List.Pop<L>
with only one entry in the list, the resulting type is an empty list instead of the single element.Reproduce the bug
Expected behavior
I would expect the type to behave similar to
Array.pop()
, and it's description lets one assume that it does, but the above example showcases that this is not the case.Possible Solution
I'm currently testing out a solution for this, as soon as I have more insight I will update the issue.
Screenshots
Additional context
The text was updated successfully, but these errors were encountered: