From 43c920f8dca238756fe9cfc4394429028b892227 Mon Sep 17 00:00:00 2001 From: hufeng Date: Wed, 8 Jun 2022 11:31:50 +0800 Subject: [PATCH] fixed 066c45d from https://gitee.com/hufeng20/ark_ts2abc/pulls/295 Fix loading func obj wrongly in methodBody Signed-off-by: hufeng Change-Id: I80d7b058e14dd4fd741ec155ca883d91be78d78b --- ts2panda/src/compiler.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ts2panda/src/compiler.ts b/ts2panda/src/compiler.ts index 59cd1d776e..535f82f13e 100644 --- a/ts2panda/src/compiler.ts +++ b/ts2panda/src/compiler.ts @@ -232,7 +232,7 @@ export class Compiler { private storeFuncObj2LexEnvIfNeeded() { let rootNode = this.rootNode; - if (!ts.isFunctionExpression(rootNode) && !ts.isMethodDeclaration(rootNode)) { + if (!ts.isFunctionExpression(rootNode)) { return; } let functionScope = this.recorder.getScopeOfNode(rootNode); -- Gitee