diff --git a/ets2panda/checker/ets/function.cpp b/ets2panda/checker/ets/function.cpp index b5766897c885b0c89f5b19af185464b7384ce2ac..133e76aadf4ce2a2514923efea75f3e6ef7faefc 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; }