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!(