diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_decrement/postfix_decrement_byte.ets b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_decrement/postfix_decrement_byte.ets index c9f4b0827d152bd92fe95fc7ee51bf01e43db80e..7b8efe887d31f74e5f81530be6818552a441be18 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_decrement/postfix_decrement_byte.ets +++ b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_decrement/postfix_decrement_byte.ets @@ -16,6 +16,7 @@ limitations under the License. {% for v in values %} /*--- desc: check postfix decrement for byte operand +tags: [negative, compile-only] ---*/ function main(): void { @@ -26,3 +27,5 @@ function main(): void { } {% endfor %} + +/* @@? 23:18 Error TypeError: Type 'Int' cannot be assigned to type 'Byte' */ diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_decrement/postfix_decrement_short.ets b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_decrement/postfix_decrement_short.ets index 0401906dfc2f01a568cef52dde3659f81d8aad24..e35969119d07dbbaa5052b1816db748a30ff937f 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_decrement/postfix_decrement_short.ets +++ b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_decrement/postfix_decrement_short.ets @@ -16,6 +16,7 @@ limitations under the License. {% for v in values %} /*--- desc: check postfix decrement for short integer operand +tags: [negative, compile-only] ---*/ function main(): void { @@ -26,3 +27,5 @@ function main(): void { } {% endfor %} + +/* @@? 23:19 Error TypeError: Type 'Int' cannot be assigned to type 'Short' */ diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_increment/postfix_increment_byte.ets b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_increment/postfix_increment_byte.ets index 96a83de32729b2276f73412c5f38e99b610a8426..8d13f5c6e4178e16476d4626072d4e42d0ab2bc5 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_increment/postfix_increment_byte.ets +++ b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_increment/postfix_increment_byte.ets @@ -16,6 +16,7 @@ limitations under the License. {% for v in values %} /*--- desc: check postfix increment for byte operand +tags: [negative, compile-only] ---*/ function main(): void { @@ -26,3 +27,5 @@ function main(): void { } {% endfor %} + +/* @@? 23:18 Error TypeError: Type 'Int' cannot be assigned to type 'Byte' */ diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_increment/postfix_increment_short.ets b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_increment/postfix_increment_short.ets index 3e0169256ec2d77ca5a6d57cd1207c324ce98a82..0f96d9d9e28b1e3e58db2f1331b99d1b552945f9 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_increment/postfix_increment_short.ets +++ b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/postfix_increment/postfix_increment_short.ets @@ -16,6 +16,7 @@ limitations under the License. {% for v in values %} /*--- desc: check postfix increment for short integer operand +tags: [negative, compile-only] ---*/ function main(): void { @@ -26,3 +27,5 @@ function main(): void { } {% endfor %} + +/* @@? 23:19 Error TypeError: Type 'Int' cannot be assigned to type 'Short' */ diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_decrement/prefix_decrement_byte.ets b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_decrement/prefix_decrement_byte.ets index a7cec74952e5c9b312b89224aa639d237466be9f..a7dc005b577674b2d411dcd697020e3379bec5a9 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_decrement/prefix_decrement_byte.ets +++ b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_decrement/prefix_decrement_byte.ets @@ -16,6 +16,7 @@ limitations under the License. {% for v in values %} /*--- desc: check prefix decrement for byte operand +tags: [negative, compile-only] ---*/ function main(): void { @@ -26,3 +27,5 @@ function main(): void { } {% endfor %} + +/* @@? 23:22 Error TypeError: Type 'Int' cannot be assigned to type 'Byte' */ diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_decrement/prefix_decrement_short.ets b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_decrement/prefix_decrement_short.ets index 20aa514c2245ac1e8aa3746be75a9e1bd5189c49..d3377a5ad4a41b33f4878bbce3cd5b841a94f03e 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_decrement/prefix_decrement_short.ets +++ b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_decrement/prefix_decrement_short.ets @@ -16,6 +16,7 @@ limitations under the License. {% for v in values %} /*--- desc: check prefix decrement for short integer operand +tags: [negative, compile-only] ---*/ function main(): void { @@ -26,3 +27,5 @@ function main(): void { } {% endfor %} + +/* @@? 23:23 Error TypeError: Type 'Int' cannot be assigned to type 'Short' */ diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_increment/prefix_increment_byte.ets b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_increment/prefix_increment_byte.ets index b79d2724eeaa82a5db218702b5c47a3943180a28..f831742eb15b388cffa45dfd5f77f19b2dea7591 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_increment/prefix_increment_byte.ets +++ b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_increment/prefix_increment_byte.ets @@ -16,6 +16,7 @@ limitations under the License. {% for v in values %} /*--- desc: check prefix increment for byte operand +tags: [negative, compile-only] ---*/ function main(): void { @@ -26,3 +27,5 @@ function main(): void { } {% endfor %} + +/* @@? 23:22 Error TypeError: Type 'Int' cannot be assigned to type 'Byte' */ diff --git a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_increment/prefix_increment_short.ets b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_increment/prefix_increment_short.ets index 7bbd19dc98a9c7d571b230e12576bf108305f86a..9aa26aa5e2f5a95680b067129aedea153dd7c137 100644 --- a/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_increment/prefix_increment_short.ets +++ b/static_core/plugins/ets/tests/ets-templates/03.types/06.value_types/02.integer_types_and_operations/prefix_increment/prefix_increment_short.ets @@ -16,6 +16,7 @@ limitations under the License. {% for v in values %} /*--- desc: check prefix increment for short integer operand +tags: [negative, compile-only] ---*/ function main(): void { @@ -26,3 +27,5 @@ function main(): void { } {% endfor %} + +/* @@? 23:23 Error TypeError: Type 'Int' cannot be assigned to type 'Short' */ diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion.params.yaml index c9bf128c999b28042db4c534f997022838a247b4..d746c56d55f5a2b57959d42cad29cf1bce4d3ba4 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion.params.yaml @@ -13,15 +13,11 @@ --- types: - - { ptype: byte, expr: 0x55, postfix: ++, result: 86 } - - { ptype: short, expr: 0x5555, postfix: ++, result: 21846 } - { ptype: int, expr: 0x12121212, postfix: ++, result: 303174163 } - { ptype: long, expr: 0x3434343456565656, postfix: ++, result: 3761688988152649303 } - { ptype: float, expr: 0.00001f, postfix: ++, result: 1.00001f } - { ptype: double, expr: 0.00000000001, postfix: ++, result: 1.00000000001 } - - { ptype: byte, expr: 0x55, postfix: --, result: 84 } - - { ptype: short, expr: 0x5555, postfix: --, result: 21844 } - { ptype: int, expr: 0x12121212, postfix: --, result: 303174161 } - { ptype: long, expr: 0x3434343456565656, postfix: --, result: 3761688988152649301 } - { ptype: float, expr: 0.00001f, postfix: --, result: -0.99999f} diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion_byte.ets b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion_byte.ets new file mode 100644 index 0000000000000000000000000000000000000000..82fc479d2dd31dd0f7ed1ff6528cf214cdc3f5ee --- /dev/null +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion_byte.ets @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{% for t in types %} +/*--- +desc: Casting conversion implicitly in the following arithmetic operations - Postfix Increment +tags: [negative, compile-only] +---*/ + +function main(): void { + let p{{loop.index}}: {{t.ptype}} = {{t.expr|safe}}; + let r{{loop.index}}: {{t.ptype}} = p{{loop.index}}{{t.postfix}}; + arktest.assertEQ(p{{loop.index}}, {{t.result}}) +} +{% endfor %} + +/* @@? 23:18 Error TypeError: Type 'Int' cannot be assigned to type 'Byte' */ diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion_byte.params.yaml new file mode 100644 index 0000000000000000000000000000000000000000..14f1b767bc2563f6e1430f634159089a9a054586 --- /dev/null +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion_byte.params.yaml @@ -0,0 +1,18 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +types: + - { ptype: byte, expr: 0x55, postfix: ++, result: 86 } + + - { ptype: byte, expr: 0x55, postfix: --, result: 84 } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion_short.ets b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion_short.ets new file mode 100644 index 0000000000000000000000000000000000000000..49b667362871d054248f137116f520958ac1b3a8 --- /dev/null +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion_short.ets @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{% for t in types %} +/*--- +desc: Casting conversion implicitly in the following arithmetic operations - Postfix Increment +tags: [negative, compile-only] +---*/ + +function main(): void { + let p{{loop.index}}: {{t.ptype}} = {{t.expr|safe}}; + let r{{loop.index}}: {{t.ptype}} = p{{loop.index}}{{t.postfix}}; + arktest.assertEQ(p{{loop.index}}, {{t.result}}) +} +{% endfor %} + +/* @@? 23:19 Error TypeError: Type 'Int' cannot be assigned to type 'Short' */ diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion_short.params.yaml new file mode 100644 index 0000000000000000000000000000000000000000..688f72fc49e1d7534b4e7d10598582c2a9119de7 --- /dev/null +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/postfix_conversion_short.params.yaml @@ -0,0 +1,18 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- +types: + - { ptype: short, expr: 0x5555, postfix: ++, result: 21846 } + + - { ptype: short, expr: 0x5555, postfix: --, result: 21844 } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion.params.yaml index 0ba99f409b3abef89f185b1fad7f9d756aabf5f7..4c1ed8b6c65134a766a4d5f02c853a0fa19a87b9 100644 --- a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion.params.yaml @@ -14,15 +14,11 @@ --- types: - - { ptype: byte, expr: 0x55, prefix: ++, result: 86 } - - { ptype: short, expr: 0x5555, prefix: ++, result: 21846 } - { ptype: int, expr: 0x12121212, prefix: ++, result: 303174163 } - { ptype: long, expr: 0x3434343456565656, prefix: ++, result: 3761688988152649303 } - { ptype: float, expr: 0.00001f, prefix: ++, result: 1.00001f } - { ptype: double, expr: 0.00000000001, prefix: ++, result: 1.00000000001 } - - { ptype: byte, expr: 0x55, prefix: --, result: 84 } - - { ptype: short, expr: 0x5555, prefix: --, result: 21844 } - { ptype: int, expr: 0x12121212, prefix: --, result: 303174161 } - { ptype: long, expr: 0x3434343456565656, prefix: --, result: 3761688988152649301 } - { ptype: float, expr: 0.00001f, prefix: --, result: -0.99999f } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion_byte.ets b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion_byte.ets new file mode 100644 index 0000000000000000000000000000000000000000..1fdd8f3a5616d71bad63af175f36655cf1eecdcb --- /dev/null +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion_byte.ets @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{% for t in types %} +/*--- +desc: Casting conversion implicitly in the following arithmetic operations - Prefix Increment +tags: [negative, compile-only] +---*/ + +function main(): void { + let p{{loop.index}}: {{t.ptype}} = {{t.expr|safe}}; + let r{{loop.index}}: {{t.ptype}} = {{t.prefix}}p{{loop.index}}; + arktest.assertEQ(r{{loop.index}}, {{t.result}}) +} +{% endfor %} + +/* @@? 23:22 Error TypeError: Type 'Int' cannot be assigned to type 'Byte' */ diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion_byte.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion_byte.params.yaml new file mode 100644 index 0000000000000000000000000000000000000000..206eb2ac657fbf9f2100e17d27f3fb66d2629035 --- /dev/null +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion_byte.params.yaml @@ -0,0 +1,19 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +types: + - { ptype: byte, expr: 0x55, prefix: ++, result: 86 } + + - { ptype: byte, expr: 0x55, prefix: --, result: 84 } diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion_short.ets b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion_short.ets new file mode 100644 index 0000000000000000000000000000000000000000..796e425117d7f441fb880449a83bba192ac7d94c --- /dev/null +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion_short.ets @@ -0,0 +1,29 @@ +/* + * Copyright (c) 2025 Huawei Device Co., Ltd. + * Licensed under the Apache License, Version 2.0 (the "License"); + * you may not use this file except in compliance with the License. + * You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ + +{% for t in types %} +/*--- +desc: Casting conversion implicitly in the following arithmetic operations - Prefix Increment +tags: [negative, compile-only] +---*/ + +function main(): void { + let p{{loop.index}}: {{t.ptype}} = {{t.expr|safe}}; + let r{{loop.index}}: {{t.ptype}} = {{t.prefix}}p{{loop.index}}; + arktest.assertEQ(r{{loop.index}}, {{t.result}}) +} +{% endfor %} + +/* @@? 23:23 Error TypeError: Type 'Int' cannot be assigned to type 'Short' */ diff --git a/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion_short.params.yaml b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion_short.params.yaml new file mode 100644 index 0000000000000000000000000000000000000000..2c8c2179860bfddbdcfa718512750144d26081fd --- /dev/null +++ b/static_core/plugins/ets/tests/ets-templates/06.contexts_and_conversions/06.numeric_casting_conversions/prefix_conversion_short.params.yaml @@ -0,0 +1,19 @@ +# Copyright (c) 2025 Huawei Device Co., Ltd. +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +--- + +types: + - { ptype: short, expr: 0x5555, prefix: ++, result: 21846 } + + - { ptype: short, expr: 0x5555, prefix: --, result: 21844 } diff --git a/static_core/plugins/ets/tests/ets-templates/07.expressions/12.indexing_expression/03.record_indexing_expression/ind.params.yaml b/static_core/plugins/ets/tests/ets-templates/07.expressions/12.indexing_expression/03.record_indexing_expression/ind.params.yaml index f02abe58e6b7d0a6bef97b67e11373c978158eb6..b8695b2d284a83b8163504c481eacd1e0a03d00f 100644 --- a/static_core/plugins/ets/tests/ets-templates/07.expressions/12.indexing_expression/03.record_indexing_expression/ind.params.yaml +++ b/static_core/plugins/ets/tests/ets-templates/07.expressions/12.indexing_expression/03.record_indexing_expression/ind.params.yaml @@ -14,13 +14,14 @@ --- cases: # Record key is a union of string literal types - - use: |- + - tags: 'compile-only, negative' + use: |- // key is a union of literal types let idx: short = 0 let r: Record<"1"|"2"|"3", Short> = { "1": (idx += 1), - "2": idx++, - "3": ++idx, + "2": idx++, // CTE expected, update expression will extend 'idx' to the 'Int' type + "3": ++idx, // CTE expected, update expression will extend 'idx' to the 'Int' type } arktest.assertTrue(idx == 3) arktest.assertTrue(r["1"] == 1 && r["2"] == 1 && r["3"] == 3)