From 5ae4827ed6b6b773586b5da7e96f1c5c0a65efc9 Mon Sep 17 00:00:00 2001 From: Andrei Voronin Date: Mon, 11 Dec 2023 10:56:22 +0300 Subject: [PATCH] Fix I8G6U6 first half MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixing first half of a bug which include issue with Int and Int|null by adding check of flags. Description: Fixing I8G6U6 bug - [ArkTS frontend] es2panda fails to compile overloaded functions. Issue: https://gitee.com/openharmony/arkcompiler_ets_frontend/issues/I8G6U6 Signed-off-by: Andrei Voronin --- ets2panda/checker/ets/function_helpers.h | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/ets2panda/checker/ets/function_helpers.h b/ets2panda/checker/ets/function_helpers.h index a4b7e1d091..bf59b13068 100644 --- a/ets2panda/checker/ets/function_helpers.h +++ b/ets2panda/checker/ets/function_helpers.h @@ -163,7 +163,9 @@ static bool CmpAssemblerTypesWithRank(Signature *sig1, Signature *sig2) sig2->Params()[ix]->TsType()->ToAssemblerTypeWithRank(s2); if (s1.str() != s2.str()) { return false; - break; + } + if (sig1->Params()[ix]->TsType()->TypeFlags() != sig2->Params()[ix]->TsType()->TypeFlags()) { + return false; } } return true; -- Gitee