diff --git a/ets2panda/compiler/lowering/util.cpp b/ets2panda/compiler/lowering/util.cpp index 70277eeeacd0d1635c97ae70d11d137873a1c50d..397eb4ad56435a9114a07391da36be2b235c059f 100644 --- a/ets2panda/compiler/lowering/util.cpp +++ b/ets2panda/compiler/lowering/util.cpp @@ -57,6 +57,7 @@ util::UString GenName(ArenaAllocator *const allocator) void SetSourceRangesRecursively(ir::AstNode *node, const lexer::SourceRange &range) { + ES2PANDA_ASSERT(node != nullptr); node->SetRange(range); node->IterateRecursively([](ir::AstNode *n) { n->SetRange(n->Parent()->Range()); }); } diff --git a/ets2panda/public/es2panda_lib.cpp b/ets2panda/public/es2panda_lib.cpp index 1a0d1f9d2c00edc36bdfb2e4402d603c002e57eb..7d1405550e064425f37bb48aa39ce187869b4f51 100644 --- a/ets2panda/public/es2panda_lib.cpp +++ b/ets2panda/public/es2panda_lib.cpp @@ -130,7 +130,7 @@ __attribute__((unused)) es2panda_variantDoubleCharArrayBool EnumMemberResultToEs // NOLINTBEGIN(cppcoreguidelines-pro-type-union-access) // NOLINTBEGIN(cppcoreguidelines-pro-bounds-pointer-arithmetic, readability-simplify-subscript-expr) es2panda_variantDoubleCharArrayBool es2panda_variant; - es2panda_variant.index = variant.index(); + es2panda_variant.index = static_cast(variant.index()); switch (es2panda_variant.index) { case es2panda_variantIndex::CAPI_DOUBLE: es2panda_variant.variant.d = std::get(variant);