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
2 changes: 1 addition & 1 deletion compiler/noirc_frontend/src/monomorphization/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2840,7 +2840,7 @@ pub(crate) fn resolve_trait_item(
// We also need to apply any instantiation bindings if the expression has any
let instantiation_bindings = interner.try_get_instantiation_bindings(expr_id);
let value = if let Some(instantiation_bindings) = instantiation_bindings {
item.typ.substitute(instantiation_bindings)
item.typ.force_substitute(instantiation_bindings)
} else {
item.typ.clone()
};
Expand Down
6 changes: 6 additions & 0 deletions test_programs/execution_success/regression_10466/Nargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[package]
name = "regression_10466"
type = "bin"
authors = [""]

[dependencies]
31 changes: 31 additions & 0 deletions test_programs/execution_success/regression_10466/src/main.nr
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
pub trait Serialize {
let N: u32;

fn serialize(self);
}

impl Serialize for Field {
let N: u32 = 1;

fn serialize(self) {}
}

impl<T, let M: u32> Serialize for [T; M]
where
T: Serialize,
{
let N: u32 = <T as Serialize>::N * M;

fn serialize(self) {
std::println(Self::N);
std::println(<T as Serialize>::N);
std::println(M);
assert_eq(<T as Serialize>::N * M, Self::N);
}
}

fn main() {
let nested_array = [[1], [2]];

let _ = nested_array.serialize();
}
4 changes: 2 additions & 2 deletions tooling/nargo_cli/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -168,13 +168,13 @@ const IGNORED_NARGO_EXPAND_EXECUTION_TESTS: [&str; 10] = [
// bug
"numeric_type_alias",
"negative_associated_constants",
// bug
"regression_9116",
// There's no "src/main.nr" here so it's trickier to make this work
"overlapping_dep_and_mod",
// bug
"regression_9116",
// bug
"regression_10466",
// bug
"trait_associated_constant",
// There's no "src/main.nr" here so it's trickier to make this work
"workspace",
Expand Down

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading