You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: crates/cairo-lang-semantic/src/path_test_data/tests
+42Lines changed: 42 additions & 0 deletions
Original file line number
Diff line number
Diff line change
@@ -1,3 +1,45 @@
1
+
//! > Path via crate does not double-encode the crate name.
2
+
3
+
//! > test_runner_name
4
+
test_path_diagnostics(expect_diagnostics: true)
5
+
6
+
//! > crate_settings
7
+
edition = "2024_07"
8
+
9
+
//! > module_code
10
+
mod provider1 {
11
+
pub trait T {
12
+
fn foo(self: @felt252);
13
+
}
14
+
impl I of T {
15
+
fn foo(self: @felt252) {}
16
+
}
17
+
}
18
+
mod provider2 {
19
+
pub trait T {
20
+
fn foo(self: @felt252);
21
+
}
22
+
impl I of T {
23
+
fn foo(self: @felt252) {}
24
+
}
25
+
}
26
+
mod caller {
27
+
use crate::provider1::*;
28
+
use crate::provider2::*;
29
+
fn go() {
30
+
let x = 1_felt252;
31
+
x.foo();
32
+
}
33
+
}
34
+
35
+
//! > expected_diagnostics
36
+
error[E2046]: Ambiguous method call. More than one applicable trait function with a suitable self type was found: crate::provider1::T::foo and crate::provider2::T::foo. Consider adding type annotations or explicitly refer to the impl function.
0 commit comments