JS: Fix missing flow into rest pattern lvalue

This commit is contained in:
Asger F
2025-04-11 08:33:29 +02:00
parent 7703b1fab5
commit 719456e27d
3 changed files with 11 additions and 3 deletions

View File

@@ -1,15 +1,15 @@
function t1() {
const { ...rest } = source('t1.1');
rest; // $ MISSING: getALocalSource=rest
rest; // $ getALocalSource=rest
}
function t2() {
const [ ...rest ] = source('t2.1');
rest; // $ MISSING: getALocalSource=rest
rest; // $ getALocalSource=rest
}
function t3() {
const { p1, ...rest } = source('t3.1');
p1; // $ getALocalSource=p1
rest; // $ MISSING: getALocalSource=rest
rest; // $ getALocalSource=rest
}

View File

@@ -1 +1,4 @@
| rest-pattern.js:3:5:3:8 | rest | rest |
| rest-pattern.js:8:5:8:8 | rest | rest |
| rest-pattern.js:13:5:13:6 | p1 | p1 |
| rest-pattern.js:14:5:14:8 | rest | rest |