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/10682-codegen-testbuild-missing-field.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
**Fix the `perry-codegen` lib-test build, which `-D warnings --all-targets` rejects on `main`.**

#10484's `constructor_has_synthetic_arguments` field was added to `ImportedClass`, but two test
fixtures construct that struct literally and were never updated:
`expr/instanceof_imported_rhs_tests.rs` and `lower_call/new_builtin_shadow_tests.rs`. Both now set
it to `false`, which is the pre-#10484 behaviour they were written against.

`cargo check -p perry-codegen --lib` does not compile `cfg(test)` code, so this is invisible to the
per-crate preflight and only the workspace-wide `--all-targets` step sees it — which is why it
reached `main`. Verified: `RUSTFLAGS="-D warnings" cargo check --workspace --all-targets` (with the
usual cross-host UI exclusions) now finishes clean.
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ fn imported_class(name: &str, class_id: u32) -> ImportedClass {
namespace: None,
source_prefix: "lib_ts".to_string(),
constructor_param_count: 0,
constructor_has_synthetic_arguments: false,
has_own_constructor: true,
constructor_has_rest: false,
has_instance_fields: false,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -121,6 +121,7 @@ fn imported_class_of_the_same_name_already_shadowed_the_builtin() {
namespace: None,
source_prefix: "lib_ts".to_string(),
constructor_param_count: 0,
constructor_has_synthetic_arguments: false,
has_own_constructor: false,
constructor_has_rest: false,
has_instance_fields: false,
Expand Down
Loading