💻
- Would you like to work on a fix?
How are you using Babel?
@babel/cli
Input code
class Bar extends Foo {
constructor() {
let f = (...args) => super(...args);
f();
}
}
Example on Babel REPL
Configuration file name
.babelrc
Configuration
{
"presets": [["@babel/preset-env", { "bugfixes": true }]],
"targets": ["since 2017"]
}
Current and expected behavior
Current behavior (silently success and causing infinite recursion)
"use strict";
class Bar extends Foo {
constructor() {
var _supercall = function _supercall() {
return _supercall(...arguments);
};
let f = function f() {
return _supercall(...arguments);
};
f();
}
}
Expected behavior
- Give warning or error in this situation;
- Or just keep the arrow function;
- Or transpile the whole class into pre-ES6 style (just like the result of using since 2016).
Environment
- Babel version: v7.20.2
- Node: v16.17.0
- pnpm version: pnpm 7.14.2
- OS: Windows 10
- Monorepo: no
Possible solution
No response
Additional context
No response
Reactions are currently unavailable
💻
How are you using Babel?
@babel/cli
Input code
Example on Babel REPL
Configuration file name
.babelrc
Configuration
{ "presets": [["@babel/preset-env", { "bugfixes": true }]], "targets": ["since 2017"] }Current and expected behavior
Current behavior (silently success and causing infinite recursion)
Expected behavior
Environment
Possible solution
No response
Additional context
No response