diff options
| author | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-06-14 22:06:14 -0400 |
|---|---|---|
| committer | Marshall Lochbaum <mwlochbaum@gmail.com> | 2022-06-18 16:38:12 -0400 |
| commit | fb0e65434f9e20a80a40ceb5088aea69404480f3 (patch) | |
| tree | 354cde9fc93ab67ad5ca20c07a131c416492bc37 /docs | |
| parent | 093620ac012d011518073620577d5807f7582267 (diff) | |
Don't allow list destructuring with aliases in bqn.js and vm.bqn
Diffstat (limited to 'docs')
| -rw-r--r-- | docs/bqn.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/docs/bqn.js b/docs/bqn.js index 2ea49108..879859a6 100644 --- a/docs/bqn.js +++ b/docs/bqn.js @@ -75,6 +75,8 @@ let set = (d, id, v) => { let cs=v.sh.slice(1); let c=cs.reduce((a,b)=>a*b,1); let cell = j => arr(v.slice(c*j,c*j+c),cs,v.fill); id.map((n,j)=>set(d,n,cell(j))); + } else if (id.m) { + throw Error("← or ↩: Can't use alias in list destructuring"); } else { if (v.sh) { if (!eq(id.sh,v.sh)) throw Error("← or ↩: Target and value shapes don't match"); |
