question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

certain bug: Illegal async arrow function parameter list

See original GitHub issue

version: 1.4.8 Snippet:

async function test(){
  const someVar = null;
  const done = async foo => {}
}

Throws Illegal async arrow function parameter list (also reproducible in the REPL)

Observations: commenting out const someVar = null; fixes the problem.

Can be found in the npm package electron-updater right here node_modules/electron-updater/out/AppUpdater.js

Related issue: https://github.com/fuse-box/fuse-box/issues/1570

Being parsed without any issues with typescript or babel or esprima https://astexplorer.net/#/gist/3e1e685684c77a841dd4452b677654f9/6e25a2a530fc046e1dc55f5f3285fa7d5acd20d0

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:7 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
KFlashcommented, Jul 31, 2019

@leeoniya @nchanged Parsed a lot of libraries now but couldn’t find any issues or “edge cases”. I added a bunch of new tests just to be sure. Even the Chinese language is very well supported 😃

1reaction
KFlashcommented, Jul 31, 2019

@nchanged FYI. This bug was caused because of a mutual parser flag and validation against it. This flag have been replaced with a func arg assignable and validations against that arg instead. You can find it here. This means that this bug will never happen again, and everything related to it can’t happen either. So permanently solved 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

SyntaxError: Malformed formal parameter - JavaScript | MDN
The JavaScript exception "malformed formal parameter" occurs when the argument list of a Function() constructor call is invalid somehow.
Read more >
Syntax for an async arrow function - javascript - Stack Overflow
Async arrow functions look like this for multiple arguments passed to it: const foo = async (evt, callback) => { // do something...
Read more >
await in parameters · Issue #917 · tc39/ecma262 - GitHub
The grammar part seems a bit harder--suddenly, the grammar for async arrow function heads is not a subset of the grammar of CallExpression....
Read more >
4483 - Feature Request: Support async/await functions - v8
an async arrow function in a subclass constructor before a super call has returned. ... Disallow 'yield' in async arrow parameter lists inside...
Read more >
SyntaxError: Malformed formal parameter
The argument list is invalid somehow. Perhaps you accidentally picked a keyword like if or var as an argument name, or perhaps there's...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found