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.

[parser] Illegal arrow expression containing `in` as `for` lhs

See original GitHub issue

Bug Report

Copied from https://github.com/acornjs/acorn/issues/922

REPL: Safe link

(change xin to be x in and you will see REPL is stuck 😱)

Issue Analytics

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

github_iconTop GitHub Comments

3reactions
nicolo-ribaudocommented, Apr 7, 2020
for (x=>(x in y);;);

This is an infinite loop because it’s valid code, and you didn’t provide a condition in the test 😛

for (x=>(x in y); false;);
// or
for (x=>(x in y);;) break;
0reactions
kaicataldocommented, Apr 7, 2020

Ah, that makes sense 😆

Read more comments on GitHub >

github_iconTop Results From Across the Web

ES6 immediately invoked arrow function - Stack Overflow
At this point, when the parser encounters the function keyword, it knows to parse it as a function expression and not a function...
Read more >
Arrow function expressions - JavaScript - MDN Web Docs
An arrow function expression is a compact alternative to a traditional function expression, with some semantic differences and deliberate ...
Read more >
src/parsing/parser.cc - v8/v8 - Git at Google
Parsing patterns as variable reference expression creates. // NewUnresolved references in current scope. Entrer arrow function.
Read more >
PHP RFC: Arrow Functions 2.0
Arrow functions have the following basic form: fn(parameter_list) => expr. When a variable used in the expression is defined in the parent ...
Read more >
SML/NJ Error Messages
This document contains lists of error and warning messages produced by the SML/NJ ... The parser used by SML/NJ is produced by ML-Yacc,...
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