File tree Expand file tree Collapse file tree
crates/cairo-lang-semantic/src Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -754,3 +754,41 @@ error[E2038]: Generic parameter kind of impl function `FooImpl::bar` is incompat
754754 --> lib.cairo:5:12
755755 fn bar<+Drop<felt252>>(self: felt252) {}
756756 ^^^^^^^^^^^^^^
757+
758+ //! > ==========================================================================
759+
760+ //! > Multiple invalid associated-item constraints are each reported (not just the first).
761+
762+ //! > test_runner_name
763+ test_function_diagnostics(expect_diagnostics: true)
764+
765+ //! > function_code
766+ fn foo() {}
767+
768+ //! > function_name
769+ foo
770+
771+ //! > module_code
772+ trait MyTrait<T> {
773+ type Real;
774+ }
775+
776+ fn bar<T, +MyTrait<T>[Bogus1: u8, Bogus2: u16]>() {}
777+
778+ //! > crate_settings
779+ edition = "2024_07"
780+
781+ [experimental_features]
782+ negative_impls = false
783+ associated_item_constraints = true
784+
785+ //! > expected_diagnostics
786+ error[E2189]: associated type `Bogus1` not found for `MyTrait`
787+ --> lib.cairo:5:23
788+ fn bar<T, +MyTrait<T>[Bogus1: u8, Bogus2: u16]>() {}
789+ ^^^^^^^^^^
790+
791+ error[E2189]: associated type `Bogus2` not found for `MyTrait`
792+ --> lib.cairo:5:35
793+ fn bar<T, +MyTrait<T>[Bogus1: u8, Bogus2: u16]>() {}
794+ ^^^^^^^^^^^
Original file line number Diff line number Diff line change @@ -713,7 +713,7 @@ fn impl_generic_param_semantic<'db>(
713713 concrete_trait_id,
714714 } ,
715715 ) ;
716- return map ;
716+ continue ;
717717 } ;
718718
719719 let concrete_trait_type_id =
You can’t perform that action at this time.
0 commit comments