From 60e24cc73fee84f8097853ebcd4232fa09240f69 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ralph=20K=C3=BCpper?= Date: Mon, 24 Aug 2026 00:16:47 +0200 Subject: [PATCH] test(codegen): restore the unary-pos assertions lost in the #8657 squash #8650 changed `UnaryOp::Pos` on a non-numeric operand from `js_number_coerce` to `js_dynamic_pos` and updated the three computed_store_rooting_tests that assert on it. The #8657 squash kept the emission change and lost the test edit, leaving the assertions naming a helper the compiler no longer emits there. They failed 4/4 on main; 0/3 with this. Refs #8658. --- changelog.d/8658-restore-lost-unary-pos-assertions.md | 11 +++++++++++ .../src/expr/computed_store_rooting_tests.rs | 6 +++--- 2 files changed, 14 insertions(+), 3 deletions(-) create mode 100644 changelog.d/8658-restore-lost-unary-pos-assertions.md diff --git a/changelog.d/8658-restore-lost-unary-pos-assertions.md b/changelog.d/8658-restore-lost-unary-pos-assertions.md new file mode 100644 index 0000000000..d6a7e55489 --- /dev/null +++ b/changelog.d/8658-restore-lost-unary-pos-assertions.md @@ -0,0 +1,11 @@ +Restored three `computed_store_rooting_tests` assertions that were lost when +#8650 was squash-merged as part of #8657. + +#8650 changed unary `+` on a non-numeric operand to emit `js_dynamic_pos` +instead of `js_number_coerce` (`expr/unary.rs`, `UnaryOp::Pos`) and updated the +three tests that assert on that helper. The squash kept the emission change and +dropped the test edit, so the assertions kept naming the old helper and failed +deterministically. + +No product behaviour changes: the tests now name the helper the compiler +actually emits, which is what #8650 intended. diff --git a/crates/perry-codegen/src/expr/computed_store_rooting_tests.rs b/crates/perry-codegen/src/expr/computed_store_rooting_tests.rs index 9aeadbeb13..97e220aeaf 100644 --- a/crates/perry-codegen/src/expr/computed_store_rooting_tests.rs +++ b/crates/perry-codegen/src/expr/computed_store_rooting_tests.rs @@ -796,7 +796,7 @@ fn collecting_masked_window_index_declines_the_hoisted_pointer_tier() { let collecting = masked_window_index_coercion_loop(Type::Any); assert!( - calls(&collecting, "js_number_coerce"), + calls(&collecting, "js_dynamic_pos"), "unary + over an any key must exercise the collecting coercion witness:\n{collecting}" ); assert!( @@ -819,7 +819,7 @@ fn collecting_rhs_between_masked_reads_declines_the_hoisted_pointer_tier() { let collecting = masked_window_rhs_coercion_loop(Type::Any); assert!( - calls(&collecting, "js_number_coerce"), + calls(&collecting, "js_dynamic_pos"), "the any-typed RHS must exercise the user-coercion witness:\n{collecting}" ); assert!( @@ -842,7 +842,7 @@ fn collecting_rhs_declines_the_straight_line_masked_region() { let collecting = masked_window_rhs_coercion_region(Type::Any); assert!( - calls(&collecting, "js_number_coerce"), + calls(&collecting, "js_dynamic_pos"), "the any-typed region RHS must exercise the user-coercion witness:\n{collecting}" ); assert!(