-
-
Notifications
You must be signed in to change notification settings - Fork 5.8k
Closed
facebook/regenerator
#630Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue
Description
💻
- Would you like to work on a fix?
How are you using Babel?
Other (Next.js, Gatsby, vue-cli, ...)
Input code
var [ x ] = { [ Symbol . iterator ] : function * ( ) { yield * { [ Symbol . iterator ] : x => [ ] } ; } } ; Configuration file name
No response
Configuration
No response
Current and expected behavior
Input code is terminated with TypeError but the transpilation results in an infinite loop:
$ node input.js
input.js:1
var [ x ] = { [ Symbol . iterator ] : function * ( ) { yield * { [ Symbol . iterator ] : x => [ ] } ; } } ;
^
TypeError: undefined is not a function
at [Symbol.iterator] (input.js:1:90)
at Generator.next (<anonymous>)
at Object.<anonymous> (input.js:1:7)
at Module._compile (node:internal/modules/cjs/loader:1159:14)
at Module._extensions..js (node:internal/modules/cjs/loader:1213:10)
at Module.load (node:internal/modules/cjs/loader:1037:32)
at Module._load (node:internal/modules/cjs/loader:878:12)
at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12)
at node:internal/main/run_main_module:23:47
Node.js v18.11.0$ node output.js # never terminates
^CEnvironment
Reproduction in Babel's own REPL
Possible solution
No response
Additional context
No response
Metadata
Metadata
Assignees
Labels
outdatedA closed issue/PR that is archived due to age. Recommended to make a new issueA closed issue/PR that is archived due to age. Recommended to make a new issue