From 310d45fd6f0796bf6ad6d45aed6bb4f224c41d90 Mon Sep 17 00:00:00 2001 From: Templin Konstantin Date: Thu, 14 Aug 2025 15:01:35 +0300 Subject: [PATCH] Migrate to new langugage overloads Issue: https://gitee.com/openharmony/arkcompiler_runtime_core/issues/ICPW0K Description: - Move stdlib to new callable overloads All required pre-merge tests passed. Results are available in the internal CI Signed-off-by: Templin Konstantin --- .../extension_function_called_by_class.ets | 9 +-------- .../extension_function_duplicated_with_private_field.ets | 9 +-------- 2 files changed, 2 insertions(+), 16 deletions(-) diff --git a/ets2panda/test/ast/compiler/ets/extension_function_tests/extension_function_called_by_class.ets b/ets2panda/test/ast/compiler/ets/extension_function_tests/extension_function_called_by_class.ets index fb813f1d31..1118144045 100644 --- a/ets2panda/test/ast/compiler/ets/extension_function_tests/extension_function_called_by_class.ets +++ b/ets2panda/test/ast/compiler/ets/extension_function_tests/extension_function_called_by_class.ets @@ -27,12 +27,5 @@ function main() { console.println(A./* @@ label */price(1)); } -/* @@? 27:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Boolean): void` */ -/* @@? 27:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Byte): void` */ -/* @@? 27:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Short): void` */ -/* @@? 27:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Char): void` */ -/* @@? 27:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Int): void` */ -/* @@? 27:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Long): void` */ -/* @@? 27:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Float): void` */ -/* @@? 27:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Double): void` */ +/* @@? 27:5 Error TypeError: No matching call signature for println(...) */ /* @@@ label Error TypeError: Property 'price' does not exist on type 'A' */ diff --git a/ets2panda/test/ast/compiler/ets/extension_function_tests/extension_function_duplicated_with_private_field.ets b/ets2panda/test/ast/compiler/ets/extension_function_tests/extension_function_duplicated_with_private_field.ets index ab7af4dedc..1a21dcf713 100644 --- a/ets2panda/test/ast/compiler/ets/extension_function_tests/extension_function_duplicated_with_private_field.ets +++ b/ets2panda/test/ast/compiler/ets/extension_function_tests/extension_function_duplicated_with_private_field.ets @@ -28,12 +28,5 @@ function main() { console.println(/* @@label */banana.name(2)); } -/* @@? 28:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Boolean): void` */ -/* @@? 28:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Byte): void` */ -/* @@? 28:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Short): void` */ -/* @@? 28:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Char): void` */ -/* @@? 28:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Int): void` */ -/* @@? 28:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Long): void` */ -/* @@? 28:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Float): void` */ -/* @@? 28:5 Error TypeError: Call to `println` is ambiguous as `2` versions of `println` are available: `println(i: String): void` and `println(i: Double): void` */ +/* @@? 28:5 Error TypeError: No matching call signature for println(...) */ /* @@? 28:34 Error TypeError: No matching call signature for name(Int) */ -- Gitee