Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Track access side effects when using object spread operator (#4113)
* Check for access side effects when using the object spread operator * Make test a little more robust
- Loading branch information
1 parent
1dd8ba7
commit 4eeef6e
Showing
4 changed files
with
22 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,7 +23,7 @@ module.exports = { | |
format: 'es' | ||
} | ||
}), | ||
500 | ||
1000 | ||
); | ||
}); | ||
` | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
module.exports = { | ||
description: 'triggers getter side effects when spreading objects' | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
let result = 'FAIL'; | ||
const unused = { | ||
...{ | ||
get prop() { | ||
result = 'PASS'; | ||
} | ||
} | ||
}; | ||
assert.strictEqual(result, 'PASS'); |