Nicolò Ribaudo b84f8e9234 Don't use _possibleConstructorReturn inside arrow functions (#6103)
Arrow functions can't be entrly skipped while traversing because this
references inside of them needs to be transformed, so I added a check
which prevents return statements inside arrow functions from being
saved for the transformation.

Fixes #5817 (regression)
2017-08-14 11:11:05 -04:00

17 lines
265 B
JavaScript

// https://github.com/babel/babel/issues/5817
class Parent {}
class Table extends Parent {
constructor() {
super();
this.returnParam = (param) => {
return param;
}
}
}
const table = new Table();
assert(table.returnParam(false) === false);