diff --git a/ets2panda/checker/ets/utilityTypeHandlers.cpp b/ets2panda/checker/ets/utilityTypeHandlers.cpp index 3bc326155822b3d444b65c31076f1d1d42cf44ae..973ded1928ce249789c41be09b3a80ee79717a65 100644 --- a/ets2panda/checker/ets/utilityTypeHandlers.cpp +++ b/ets2panda/checker/ets/utilityTypeHandlers.cpp @@ -543,6 +543,7 @@ static void SetupFunctionParams(ir::ScriptFunction *function, varbinder::Functio checker->ProgramAllocator()->Adapter()), checker->ProgramAllocator()); paramExpr->Ident()->SetTsTypeAnnotation(unionType); + ES2PANDA_ASSERT(unionType != nullptr); unionType->SetParent(paramExpr->Ident()); } auto [paramVar, node] = paramScope->AddParamDecl(checker->ProgramAllocator(), checker->VarBinder(), paramExpr);