diff --git a/ets2panda/compiler/core/ETSCompiler.cpp b/ets2panda/compiler/core/ETSCompiler.cpp index 09d7df240ab32e6551008de170ebbfdcd00e30b0..087893c39f17ac9337703d6462198c12d32bf394 100644 --- a/ets2panda/compiler/core/ETSCompiler.cpp +++ b/ets2panda/compiler/core/ETSCompiler.cpp @@ -764,6 +764,9 @@ 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); }