mirror of
https://github.com/morluto/rea.git
synced 2026-11-20 05:32:44 +00:00
fix(javascript): honor outer lexical order through standalone blocks (#12701)
fix(javascript): carry lexical timing through standalone blocks
This commit is contained in:
1 parent
2245d25aaa
commit
c0ee832a30
3 files changed
+76
-26
No files matched your search
@@ -2759,6 +2759,30 @@ it.each([
|
||||
["1"],
|
||||
"candidate",
|
||||
],
|
||||
[
|
||||
"let target in a standalone block before an outer declaration",
|
||||
'let selected;const xs=[1,"one"];{[fixed,selected]=xs;}let fixed;',
|
||||
["1"],
|
||||
"candidate",
|
||||
],
|
||||
[
|
||||
"let target in multiple standalone blocks before a function-local declaration",
|
||||
'function run(){let selected;const xs=[1,"one"];{{[fixed,selected]=xs;}}let fixed;}',
|
||||
["1"],
|
||||
"candidate",
|
||||
],
|
||||
[
|
||||
"let target in a standalone block after the outer declaration",
|
||||
'let selected;let fixed;const xs=[1,"one"];{[fixed,selected]=xs;}',
|
||||
["1"],
|
||||
"resolved",
|
||||
],
|
||||
[
|
||||
"deferred callable declared inside an earlier standalone block",
|
||||
'let read;{read=()=>{let selected;const xs=[1,"one"];[fixed,selected]=xs;};}let fixed;read();',
|
||||
["1"],
|
||||
"resolved",
|
||||
],
|
||||
[
|
||||
"read before an uninitialized target",
|
||||
"let selected;let later;const xs=[1,2,3];[selected,fixed,later]=xs;let fixed;",
|
||||
|
||||
Reference in new issue
Block a user