From 66a87fc143422309e55dc5c677a6b39d325f2acb Mon Sep 17 00:00:00 2001 From: lirismankarina Date: Sun, 22 Jun 2025 02:46:01 +0300 Subject: [PATCH] Test fix for return Value() interfaces Issue: [stdlib] Return <type>Value interfaces https://gitee.com/openharmony/arkcompiler_runtime_core/issues/ICGVM6 Description: Return methods like byteValue(), shortValue(0, etc. Reason: Compatibility reasons Tests: all tests passed, new tests were added Signed-off-by: lirismankarina --- ets2panda/test/ast/parser/ets/keyof_predefined_type.ets | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ets2panda/test/ast/parser/ets/keyof_predefined_type.ets b/ets2panda/test/ast/parser/ets/keyof_predefined_type.ets index ca91aaa14d..6700401caf 100644 --- a/ets2panda/test/ast/parser/ets/keyof_predefined_type.ets +++ b/ets2panda/test/ast/parser/ets/keyof_predefined_type.ets @@ -18,5 +18,5 @@ function main():void{ let c2:keyof Int = /* @@ label2 */"field1" } -/* @@@ label1 Error TypeError: Type '"field1"' cannot be assigned to type '"toDouble"|"$_hashCode"|"add"|"toByte"|"unboxed"|"isGreaterThan"|"compareTo"|"toLong"|"createFromJSONValue"|"isLessEqualThan"|"isLessThan"|"toFloat"|"toString"|"mul"|"sub"|"isGreaterEqualThan"|"equals"|"div"|"toInt"|"toShort"|"toChar"|"valueOf"|"MIN_VALUE"|"MAX_VALUE"|"BIT_SIZE"|"BYTE_SIZE"' */ -/* @@@ label2 Error TypeError: Type '"field1"' cannot be assigned to type '"toDouble"|"$_hashCode"|"add"|"toByte"|"unboxed"|"isGreaterThan"|"compareTo"|"toLong"|"createFromJSONValue"|"isLessEqualThan"|"isLessThan"|"toFloat"|"toString"|"mul"|"sub"|"isGreaterEqualThan"|"equals"|"div"|"toInt"|"toShort"|"toChar"|"valueOf"|"MIN_VALUE"|"MAX_VALUE"|"BIT_SIZE"|"BYTE_SIZE"' */ +/* @@@ label1 Error TypeError: Type '"field1"' cannot be assigned to type '"toDouble"|"toLong"|"byteValue"|"doubleValue"|"longValue"|"equals"|"isGreaterEqualThan"|"intValue"|"toInt"|"div"|"shortValue"|"isLessThan"|"toShort"|"toChar"|"createFromJSONValue"|"isLessEqualThan"|"mul"|"sub"|"toString"|"toFloat"|"compareTo"|"isGreaterThan"|"unboxed"|"$_hashCode"|"add"|"toByte"|"floatValue"|"valueOf"|"MIN_VALUE"|"MAX_VALUE"|"BIT_SIZE"|"BYTE_SIZE"' */ +/* @@@ label2 Error TypeError: Type '"field1"' cannot be assigned to type '"toDouble"|"toLong"|"byteValue"|"doubleValue"|"longValue"|"equals"|"isGreaterEqualThan"|"intValue"|"toInt"|"div"|"shortValue"|"isLessThan"|"toShort"|"toChar"|"createFromJSONValue"|"isLessEqualThan"|"mul"|"sub"|"toString"|"toFloat"|"compareTo"|"isGreaterThan"|"unboxed"|"$_hashCode"|"add"|"toByte"|"floatValue"|"valueOf"|"MIN_VALUE"|"MAX_VALUE"|"BIT_SIZE"|"BYTE_SIZE"' */ -- Gitee