Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 11 additions & 0 deletions changelog.d/8658-restore-lost-unary-pos-assertions.md
Original file line number Diff line number Diff line change
@@ -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.
6 changes: 3 additions & 3 deletions crates/perry-codegen/src/expr/computed_store_rooting_tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand All @@ -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!(
Expand All @@ -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!(
Expand Down
Loading