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
Historically the problem here is that an expression like let [a, b] = ... isn't irrefutable in the general case. Even something like this:
let[head, ..tail] = foo();
is refutable in the case where the result of foo() is an empty vector.
However, I wonder if this can be made to work only in the case of functions that return fixed-length vectors. If we know that the return type of foo() is [T, ..N] for any N > 0, this should be irrefutable, correct? Would that be useful?
This expression looks refutable to me, but the compiler shows an error:
The text was updated successfully, but these errors were encountered: