diff --git a/ets2panda/checker/ETSchecker.cpp b/ets2panda/checker/ETSchecker.cpp index eed861a87bb438abd614d1b709e6002069cf14f1..f9e052f39f937fd28397b1efeaa18d1da1f25fa1 100644 --- a/ets2panda/checker/ETSchecker.cpp +++ b/ets2panda/checker/ETSchecker.cpp @@ -426,7 +426,7 @@ bool ETSChecker::IsClassStaticMethod(checker::ETSObjectType *objType, checker::S // Bugs: these types do not appear as a valid TypeKind, as the TypeKind has more then one bit set [[maybe_unused]] static constexpr auto NOT_A_TYPE_KIND = TypeFlag::ETS_DYNAMIC_FLAG; - + CHECK_NOT_NULL(type); auto res = static_cast(type->TypeFlags() & ~(TO_CLEAR)); ES2PANDA_ASSERT_POS(res == TypeFlag::NONE || helpers::math::IsPowerOfTwo(res & ~(NOT_A_TYPE_KIND)), ark::es2panda::GetPositionForDiagnostic()); diff --git a/ets2panda/checker/types/ets/etsAnyType.cpp b/ets2panda/checker/types/ets/etsAnyType.cpp index 811705455b8d6f9b88ff1d5b3624ce67a0aa2d46..63dc4d14176068f7a18e0ad929ab48a862765001 100644 --- a/ets2panda/checker/types/ets/etsAnyType.cpp +++ b/ets2panda/checker/types/ets/etsAnyType.cpp @@ -64,6 +64,7 @@ void ETSAnyType::Cast(TypeRelation *relation, Type *target) if (relation->ApplyUnboxing()) { auto *const boxedTarget = relation->GetChecker()->AsETSChecker()->MaybeBoxInRelation(target); + ES2PANDA_ASSERT(boxedTarget != nullptr); conversion::Unboxing(relation, boxedTarget->AsETSObjectType()); relation->Result(true); } diff --git a/ets2panda/compiler/core/ETSGen.cpp b/ets2panda/compiler/core/ETSGen.cpp index bd7cb0bcbe58efbaff92b1678f72441a5e94fce2..040790ec1bbe6291835f0531d64e083dda06ee76 100644 --- a/ets2panda/compiler/core/ETSGen.cpp +++ b/ets2panda/compiler/core/ETSGen.cpp @@ -788,6 +788,7 @@ void ETSGen::IsInstanceDynamic(const ir::BinaryExpression *const node, const VRe void ETSGen::TestIsInstanceConstituent(const ir::AstNode *const node, std::tuple