From b561e3edcb513c3764c3dacfb91f37f9155f1766 Mon Sep 17 00:00:00 2001 From: qiu_yu_jia Date: Thu, 31 Jul 2025 09:05:34 +0800 Subject: [PATCH] modify Array get and set index to int Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/ICRYGD Signed-off-by: qiu_yu_jia --- ets2panda/scripts/arkui.properties | 2 +- ets2panda/test/ast/parser/ets/nonIntegralIndex.ets | 2 +- ets2panda/test/runtime/ets/string_literals_inference.ets | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/ets2panda/scripts/arkui.properties b/ets2panda/scripts/arkui.properties index d1356f2289..3bfafba8ef 100644 --- a/ets2panda/scripts/arkui.properties +++ b/ets2panda/scripts/arkui.properties @@ -1,3 +1,3 @@ ARKUI_DEV_REPO=https://gitee.com/rri_opensource/koala_projects.git -ARKUI_DEV_BRANCH=panda_rev_10-array-indexof-int +ARKUI_DEV_BRANCH=panda_rev_10-array_get_set_number2int ARKUI_DEST=koala-sig diff --git a/ets2panda/test/ast/parser/ets/nonIntegralIndex.ets b/ets2panda/test/ast/parser/ets/nonIntegralIndex.ets index 99ae69249a..51b76e0ed8 100644 --- a/ets2panda/test/ast/parser/ets/nonIntegralIndex.ets +++ b/ets2panda/test/ast/parser/ets/nonIntegralIndex.ets @@ -15,6 +15,6 @@ export class Test { private static fn(u: double[], i: double): void { - u[/* @@ label */i] = 0.0 + u[/* @@ label */i.toInt()] = 0.0 } } diff --git a/ets2panda/test/runtime/ets/string_literals_inference.ets b/ets2panda/test/runtime/ets/string_literals_inference.ets index f8b10dfc06..57dcfa61f3 100644 --- a/ets2panda/test/runtime/ets/string_literals_inference.ets +++ b/ets2panda/test/runtime/ets/string_literals_inference.ets @@ -22,7 +22,7 @@ function id(v: Object): T { return v as T } -function getColor(colors: Array<"default"|"invisible"|number>, id: number) { +function getColor(colors: Array<"default"|"invisible"|number>, id: int) { return colors[id] } -- Gitee