diff --git a/ets2panda/compiler/lowering/ets/restTupleLowering.cpp b/ets2panda/compiler/lowering/ets/restTupleLowering.cpp index 36554fe955212ce3e679794bc205195106f145e5..9d388f9afb56042b054af752d5637168318934a4 100644 --- a/ets2panda/compiler/lowering/ets/restTupleLowering.cpp +++ b/ets2panda/compiler/lowering/ets/restTupleLowering.cpp @@ -268,7 +268,6 @@ ir::ScriptFunction *CreateNewScriptFunction(public_lib::Context *ctx, ir::Script for (auto *annotationUsage : scriptFunc->Annotations()) { annotationUsages.push_back(annotationUsage->Clone(allocator, newScriptFunc)->AsAnnotationUsage()); } - std::cerr << "CreateNewScriptFunction SetAnnotations for newScriptFunc " << newScriptFunc << std::endl; newScriptFunc->SetAnnotations(std::move(annotationUsages)); ir::Identifier *newScriptFuncId = scriptFunc->Id()->Clone(allocator, newScriptFunc); diff --git a/ets2panda/compiler/lowering/ets/unboxLowering.cpp b/ets2panda/compiler/lowering/ets/unboxLowering.cpp index 2f60dd17e0840b7eb6c1fa74b467109a2daca2ec..8a9c49e31d9bd9df52e6caa2f29bab8d2cbf16a9 100644 --- a/ets2panda/compiler/lowering/ets/unboxLowering.cpp +++ b/ets2panda/compiler/lowering/ets/unboxLowering.cpp @@ -923,8 +923,8 @@ struct UnboxVisitor : public ir::visitor::EmptyAstVisitor { ES2PANDA_ASSERT(!call->Arguments().empty()); call->SetTsType(call->Arguments()[0]->TsType()); } - } else { - call->SetTsType(call->Signature()->ReturnType()); + } else if (auto *returnType = call->Signature()->ReturnType(); returnType->IsETSPrimitiveType()) { + call->SetTsType(returnType); } } diff --git a/ets2panda/test/test-lists/ets-runtime/ets-runtime-ignored.txt b/ets2panda/test/test-lists/ets-runtime/ets-runtime-ignored.txt index 0b82d086c3dd08f5bd2c1c280c74ac7528e69068..93b868ca784e4b3db775a922f0202ab8b91009f4 100644 --- a/ets2panda/test/test-lists/ets-runtime/ets-runtime-ignored.txt +++ b/ets2panda/test/test-lists/ets-runtime/ets-runtime-ignored.txt @@ -113,8 +113,6 @@ lambda_with_restparameter_optinal.ets overload-primitive-and-object.ets lambda_with_restparameter_optinal_fixedarray.ets finallyTryAbruptedByReturn.ets -generic_lambda_3.ets -generic_lambda_6.ets Recursive_Parameter_2.ets Recursive_Parameter_3.ets