From a3a7dc2f47bba92c4d9fcb35f639ff9b0e085f6b Mon Sep 17 00:00:00 2001 From: tolgayakar Date: Fri, 20 Jun 2025 10:40:41 +0300 Subject: [PATCH] Fix compiler crash Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/ICGNX6 Signed-off-by: tolgayakar --- ets2panda/compiler/core/ETSCompiler.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/ets2panda/compiler/core/ETSCompiler.cpp b/ets2panda/compiler/core/ETSCompiler.cpp index 09d7df240a..5249a1ba42 100644 --- a/ets2panda/compiler/core/ETSCompiler.cpp +++ b/ets2panda/compiler/core/ETSCompiler.cpp @@ -764,6 +764,11 @@ void ETSCompiler::Compile(const ir::Identifier *expr) const ETSGen *etsg = GetETSGen(); auto const *smartType = expr->TsType(); + + if (smartType == nullptr) { + return; + } + if (smartType->IsETSTypeParameter() || smartType->IsETSPartialTypeParameter() || smartType->IsETSNonNullishType()) { smartType = etsg->Checker()->GetApparentType(smartType); } -- Gitee