зеркало из https://github.com/microsoft/gather.git
Find name uses within classes
This commit is contained in:
Родитель
8ecd9815d6
Коммит
f1c877fa5d
|
@ -337,6 +337,11 @@ export class DataflowAnalyzer {
|
|||
uses = undefinedRefs.filter(r => r.level == ReferenceType.USE);
|
||||
break;
|
||||
case ast.CLASS:
|
||||
// For each class function, call getUses
|
||||
const usesArr = statement.code
|
||||
.flatMap(classStatement => this.getUses(classStatement, _));
|
||||
// Don't reduce an empty array
|
||||
uses = usesArr.length > 0 ? usesArr.reduce((prev, curr) => prev.union(curr)) : uses;
|
||||
break;
|
||||
default: {
|
||||
const usedNames = gatherNames(statement);
|
||||
|
|
Загрузка…
Ссылка в новой задаче