From 8a34bc04bdb28d7c6ee5a7daedc0580def2629bc Mon Sep 17 00:00:00 2001 From: xingshunxiang Date: Sun, 8 Jun 2025 19:29:14 +0800 Subject: [PATCH] Fix internal class and interface crash Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/ICDGTU?from=project-issue Description: a bug introduced by ast-cache, we no need to collect the internal class to the record table. Reason: a bug introduced by ast-cache, we no need to collect the internal class to the record table. Tests: ninja tests passed tests/tests-u-runner/runner.sh --ets-cts --show-progress --build-dir x64.release --processes=all passed tests/tests-u-runner/runner.sh --ets-func-tests --show-progress --build-dir x64.release --processes=all passed tests/tests-u-runner/runner.sh --astchecker --show-progress --build-dir x64.release --processes=all passed tests/tests-u-runner/runner.sh --ets-runtime --show-progress --build-dir x64.release --processes=all passed tests/tests-u-runner/runner.sh --parser --no-js --show-progress --build-dir x64.release --processes=all passed Signed-off-by: xingshunxiang --- ets2panda/varbinder/varbinder.cpp | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/ets2panda/varbinder/varbinder.cpp b/ets2panda/varbinder/varbinder.cpp index 5d754a612a..fc48436145 100644 --- a/ets2panda/varbinder/varbinder.cpp +++ b/ets2panda/varbinder/varbinder.cpp @@ -476,8 +476,7 @@ void VarBinder::VisitScriptFunction(ir::ScriptFunction *func) auto stmt = func->Body()->AsBlockStatement()->Statements(); auto scopeCtx = LexicalScope::Enter(this, funcScope); std::function doNode = [&](ir::AstNode *node) { - if (node->IsTSInterfaceDeclaration() || node->IsClassDeclaration() || node->IsTSEnumDeclaration() || - node->IsAnnotationDeclaration()) { + if (node->IsTSInterfaceDeclaration() || node->IsTSEnumDeclaration()) { ResolveReference(node); } node->Iterate([&](ir::AstNode *child) { doNode(child); }); -- Gitee