From 1cef9ced75f1eb55d9838d32341b198408372232 Mon Sep 17 00:00:00 2001 From: Aleksander Sotov Date: Wed, 16 Jul 2025 13:33:31 +0300 Subject: [PATCH] String class drop number in indexing Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/ICS3NC?from=project-issue Testing: all tests passed Signed-off-by: Aleksander Sotov --- ets2panda/scripts/arkui.properties | 2 +- .../test/ast/parser/ets/FixedArray/StringFasta.ets | 10 +++++----- ets2panda/test/ast/parser/ets/StringFasta.ets | 10 +++++----- .../code_point_at.ets | 4 ++-- 4 files changed, 13 insertions(+), 13 deletions(-) diff --git a/ets2panda/scripts/arkui.properties b/ets2panda/scripts/arkui.properties index 596d66d775..07a8f38801 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_9-array-length-int +ARKUI_DEV_BRANCH=panda_rev_9-string-to-int ARKUI_DEST=koala-sig diff --git a/ets2panda/test/ast/parser/ets/FixedArray/StringFasta.ets b/ets2panda/test/ast/parser/ets/FixedArray/StringFasta.ets index 3cc0fa0bcd..54308f81cd 100644 --- a/ets2panda/test/ast/parser/ets/FixedArray/StringFasta.ets +++ b/ets2panda/test/ast/parser/ets/FixedArray/StringFasta.ets @@ -157,16 +157,16 @@ function main(): void { /* @@? 53:27 Error TypeError: Type 'null' cannot be assigned to type 'Char' */ /* @@? 54:26 Error TypeError: Cannot find type 'HashMap'. */ /* @@? 54:57 Error TypeError: 'For-of' statement source expression is not of iterable type. */ -/* @@? 71:33 Error TypeError: Type 'Double' has no call signatures. */ -/* @@? 72:24 Error TypeError: Type 'Double' has no call signatures. */ -/* @@? 77:33 Error TypeError: Type 'Double' has no call signatures. */ -/* @@? 78:24 Error TypeError: Type 'Double' has no call signatures. */ +/* @@? 71:33 Error TypeError: Type 'Int' has no call signatures. */ +/* @@? 72:24 Error TypeError: Type 'Int' has no call signatures. */ +/* @@? 77:33 Error TypeError: Type 'Int' has no call signatures. */ +/* @@? 78:24 Error TypeError: Type 'Int' has no call signatures. */ /* @@? 84:41 Error TypeError: Cannot find type 'HashMap'. */ /* @@? 86:9 Error TypeError: Static property 'makeCumulative' must be accessed through it's class 'StringFasta' */ /* @@? 94:34 Error TypeError: Static property 'Random' must be accessed through it's class 'StringFasta' */ /* @@? 95:34 Error TypeError: Cannot find type 'HashMap'. */ /* @@? 95:65 Error TypeError: 'For-of' statement source expression is not of iterable type. */ -/* @@? 103:20 Error TypeError: Type 'Double' has no call signatures. */ +/* @@? 103:20 Error TypeError: Type 'Int' has no call signatures. */ /* @@? 112:16 Error TypeError: Static property 'fastaRepeat' must be accessed through it's class 'StringFasta' */ /* @@? 112:32 Error TypeError: Property 'count' must be accessed through 'this' */ /* @@? 113:16 Error TypeError: Static property 'fastaRandom' must be accessed through it's class 'StringFasta' */ diff --git a/ets2panda/test/ast/parser/ets/StringFasta.ets b/ets2panda/test/ast/parser/ets/StringFasta.ets index 758d82839f..47e9de0529 100644 --- a/ets2panda/test/ast/parser/ets/StringFasta.ets +++ b/ets2panda/test/ast/parser/ets/StringFasta.ets @@ -157,16 +157,16 @@ function main(): void { /* @@? 53:27 Error TypeError: Type 'null' cannot be assigned to type 'Char' */ /* @@? 54:26 Error TypeError: Cannot find type 'HashMap'. */ /* @@? 54:57 Error TypeError: 'For-of' statement source expression is not of iterable type. */ -/* @@? 71:33 Error TypeError: Type 'Double' has no call signatures. */ -/* @@? 72:24 Error TypeError: Type 'Double' has no call signatures. */ -/* @@? 77:33 Error TypeError: Type 'Double' has no call signatures. */ -/* @@? 78:24 Error TypeError: Type 'Double' has no call signatures. */ +/* @@? 71:33 Error TypeError: Type 'Int' has no call signatures. */ +/* @@? 72:24 Error TypeError: Type 'Int' has no call signatures. */ +/* @@? 77:33 Error TypeError: Type 'Int' has no call signatures. */ +/* @@? 78:24 Error TypeError: Type 'Int' has no call signatures. */ /* @@? 84:41 Error TypeError: Cannot find type 'HashMap'. */ /* @@? 86:9 Error TypeError: Static property 'makeCumulative' must be accessed through it's class 'StringFasta' */ /* @@? 94:34 Error TypeError: Static property 'Random' must be accessed through it's class 'StringFasta' */ /* @@? 95:34 Error TypeError: Cannot find type 'HashMap'. */ /* @@? 95:65 Error TypeError: 'For-of' statement source expression is not of iterable type. */ -/* @@? 103:20 Error TypeError: Type 'Double' has no call signatures. */ +/* @@? 103:20 Error TypeError: Type 'Int' has no call signatures. */ /* @@? 112:16 Error TypeError: Static property 'fastaRepeat' must be accessed through it's class 'StringFasta' */ /* @@? 112:32 Error TypeError: Property 'count' must be accessed through 'this' */ /* @@? 113:16 Error TypeError: Static property 'fastaRandom' must be accessed through it's class 'StringFasta' */ diff --git a/ets2panda/test/runtime/ets/const_variable_in_switch_statement/code_point_at.ets b/ets2panda/test/runtime/ets/const_variable_in_switch_statement/code_point_at.ets index b08891c755..d77bb5f8a9 100644 --- a/ets2panda/test/runtime/ets/const_variable_in_switch_statement/code_point_at.ets +++ b/ets2panda/test/runtime/ets/const_variable_in_switch_statement/code_point_at.ets @@ -13,9 +13,9 @@ * limitations under the License. */ -const a = ('X'.codePointAt(0) as Double).toInt() +const a = ('X'.codePointAt(0)!).toInt() arktest.assertEQ(a, 88); -const b = ('x'.codePointAt(0) as Double).toInt() +const b = ('x'.codePointAt(0)!).toInt() arktest.assertEQ(b, 120); let c = 88 let d = 0 -- Gitee