mirror of
https://github.com/openharmony/ark_ts2abc.git
synced 2026-07-19 12:33:39 -04:00
fix funcnode of global
Signed-off-by: zhangrengao <zhangrengao1@huawei.com> Change-Id: Ie794d7ee49f5ac6d5c421f827f811d9a81237c54
This commit is contained in:
@@ -138,7 +138,7 @@ export function addVariableToScope(recorder: Recorder, enableTypeRecord: boolean
|
||||
let funcNode = decl.node;
|
||||
if (ts.isFunctionDeclaration(funcNode)) {
|
||||
v = scope.add(decl, VarDeclarationKind.FUNCTION);
|
||||
} else {
|
||||
} else if (ts.isFunctionExpression(funcNode)) {
|
||||
let functionScope = <Scope>recorder.getScopeOfNode(funcNode);
|
||||
v = functionScope.add(decl, VarDeclarationKind.FUNCTION);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user