Fix super nested class bugs (#7691)
* Properly traverse nested class for supers * Add object nested in class cases * Add object nested object cases * Test class properties * Undo changes to lerna.json * Add tests arournd prefix/postfix super increment * tmp * Use sets
This commit is contained in:
@@ -57,7 +57,7 @@ export default function transformClass(
|
||||
instancePropRefs: {},
|
||||
staticPropBody: [],
|
||||
body: [],
|
||||
bareSupers: [],
|
||||
bareSupers: new Set(),
|
||||
superThises: [],
|
||||
pushedConstructor: false,
|
||||
pushedInherits: false,
|
||||
@@ -388,7 +388,7 @@ export default function transformClass(
|
||||
|
||||
path.traverse(findThisesVisitor);
|
||||
|
||||
let guaranteedSuperBeforeFinish = !!classState.bareSupers.length;
|
||||
let guaranteedSuperBeforeFinish = !!classState.bareSupers.size;
|
||||
|
||||
const superRef = classState.superName || t.identifier("Function");
|
||||
let thisRef = function() {
|
||||
|
||||
Reference in New Issue
Block a user