1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:07:35 +00:00

LibJS: Do not parse async methods with a new line after the "async"

This was already checked in normal function expressions, but was
missing for Object Expressions.
This commit is contained in:
Idan Horowitz 2021-11-10 19:19:58 +02:00 committed by Linus Groh
parent ad5061bb7a
commit d5f637fa21
2 changed files with 2 additions and 2 deletions

View file

@ -16,7 +16,7 @@ describe("parsing object literal async functions", () => {
test("simple", () => {
expect(`x = { async foo() { } }`).toEval();
expect(`x = { async
foo() { } }`).toEval();
foo() { } }`).not.toEval();
});
test("await expression", () => {
expect(`x = { foo() { await bar(); } }`).not.toEval();