Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Latest v8 breakages from Node.js v16 #4846

Closed
alexlamsl opened this issue Apr 7, 2021 · 4 comments
Closed

Latest v8 breakages from Node.js v16 #4846

alexlamsl opened this issue Apr 7, 2021 · 4 comments

Comments

@alexlamsl
Copy link
Collaborator

alexlamsl commented Apr 7, 2021

@kzc new raisins from nodejs/citgm#852 (comment)

unused_await: {
options = {
inline: true,
unused: true,
}
input: {
var await = "PASS";
(async function() {
class A {
static p = console.log(await);
}
})();
}
expect: {
var await = "PASS";
(async function() {
(() => console.log(await))();
})();
}
expect_stdout: true
node_version: ">=12"
}

 --- classes.js
     Running test [unused_await]
 !!! failed
 ---INPUT---
 {
     var await = "PASS";
     (async function() {
         class A {
             static p = console.log(await);
         }
     })();
 }
 ---EXPECTED ERROR---
 SyntaxError: Unexpected reserved word
 ---ACTUAL STDOUT---
 PASS

for_of: {
input: {
var async = [ "PASS", 42 ];
async.p = "FAIL";
for (async of (null, async))
console.log(async);
}
expect_exact: 'var async=["PASS",42];async.p="FAIL";for(async of(null,async))console.log(async);'
expect_stdout: true
node_version: ">=0.12"
}

 --- loops.js
     Running test [for_of]
 !!! failed running reminified input
 ---INPUT---
 {
     var async = [ "PASS", 42 ];
     async.p = "FAIL";
     for (async of (null, async)) console.log(async);
 }
 ---OPTIONS---
 {
     "ie8": true,
     "toplevel": true
 }
 ---OUTPUT---
 var o=["PASS",42];o.p="FAIL";for(o of o)console.log(o);
 ---EXPECTED ERROR---
 SyntaxError: The left-hand side of a for-of loop may not be 'async'.
 ---ACTUAL STDOUT---
 PASS
 42
@kzc
Copy link
Contributor

kzc commented Apr 7, 2021

Odd. It was unambiguous with token lookahead. The change is to prevent potential ambiguity with future spec changes.

https://docs.google.com/presentation/d/1POaK3AQxbdeDIq5M1RVjH1YIHe3fSxOCPPALTHIaLyo/edit#slide=id.g75ad152717_0_5

"Browsers disagree on what happens here"

@alexlamsl
Copy link
Collaborator Author

"Browsers disagree on what happens here"

Pardon my expression, but that is a sorry excuse for a specification.

Guess when the breakage does hit our CI, we'll update node_version then append to the list in README.md 🤷

@alexlamsl
Copy link
Collaborator Author

I guess ECMAScript specification is evolved by discovering bugs "features" on latest versions of v8.

@alexlamsl
Copy link
Collaborator Author

Addressed by #4857

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants