tc39 / test262

Official ECMAScript Conformance Test Suite
Other
2.41k stars 468 forks source link

Avoid using destructuring in tco-fn-realm.js #4251

Closed tannal closed 1 month ago

tannal commented 1 month ago

Fixes #4218

anba commented 1 month ago

There's another file where this pattern shows up: https://github.com/tc39/test262/blob/main/test/built-ins/Array/prototype/toString/non-callable-join-string-tag.js

Using the RegExp \}\s*=\s*Proxy\.revocable\( to search for that pattern: https://searchfox.org/mozilla-central/search?q=%5C%7D%5Cs*%3D%5Cs*Proxy%5C.revocable%5C%28&path=js%2Fsrc%2Ftests%2Ftest262%2F&case=false&regexp=true

ljharb commented 1 month ago

We should be avoiding newer syntax in any test that doesn't require it.