We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent b3e0884 commit 70d16d3Copy full SHA for 70d16d3
compiler/noirc_frontend/src/tests/traits/trait_associated_items.rs
@@ -591,6 +591,30 @@ fn associated_type_mismatch_with_inheritance() {
591
check_errors(src);
592
}
593
594
+#[test]
595
+fn associated_type_and_constant_composite() {
596
+ let src = r#"
597
+ pub trait Foo {
598
+ type Bar;
599
+ let Baz: u32;
600
+ fn foo(x: [Self::Bar; Self::Baz]) -> u32;
601
+ }
602
+
603
+ impl Foo for () {
604
+ type Bar = ();
605
+ let Baz: u32 = 0;
606
+ fn foo(_x: [Self::Bar; Self::Baz]) -> u32 {
607
+ 0
608
609
610
611
+ fn main() {
612
+ let _ = <() as Foo>::foo([(); 0]);
613
614
+ "#;
615
+ assert_no_errors(src);
616
+}
617
618
#[test]
619
fn associated_type_behind_self_as_trait() {
620
let src = r#"
0 commit comments