From 997b49599f6e1068ce6d8c77fd8a2be952cb96a5 Mon Sep 17 00:00:00 2001 From: nadolskyanton Date: Wed, 2 Jul 2025 15:31:38 +0300 Subject: [PATCH] Removed part of temporary solution Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/ICKUYR Description: remove temporary code Signed-off-by: nadolskyanton --- ets2panda/checker/ets/function.cpp | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/ets2panda/checker/ets/function.cpp b/ets2panda/checker/ets/function.cpp index b5766897c8..133e76aadf 100644 --- a/ets2panda/checker/ets/function.cpp +++ b/ets2panda/checker/ets/function.cpp @@ -947,16 +947,9 @@ Signature *ETSChecker::ValidateSignatures(ArenaVector &signatures, if (!compatibleSignatures.empty()) { // SUPPRESS_CSA_NEXTLINE(alpha.core.AllocatorETSCheckerHint) auto *sig = GetMostSpecificSignature(compatibleSignatures, arguments, pos, resolveFlags); - // NOTE (DZ): skip Promise constructor/then/catch check - - // temporary solution, need to be removed after fixing OHOS code! - if (sig == nullptr || !sig->HasFunction() || - !(sig->Function()->IsConstructor() || sig->Function()->Id()->Name().Is("then") || - sig->Function()->Id()->Name().Is("catch")) || - !sig->Owner()->Name().Is("Promise")) { - // May need to re-check the arguments now that we know the particular signature to call. - ValidateSignature({sig, nullptr, TypeRelationFlag::WIDENING | TypeRelationFlag::NO_SUBSTITUTION_NEEDED}, - arguments, pos, FindTypeInferenceArguments(arguments), true); - } + // May need to re-check the arguments now that we know the particular signature to call. + ValidateSignature({sig, nullptr, TypeRelationFlag::WIDENING | TypeRelationFlag::NO_SUBSTITUTION_NEEDED}, + arguments, pos, FindTypeInferenceArguments(arguments), true); return sig; } -- Gitee