Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/hir-ty/src/tests/coercion.rs')
-rw-r--r--crates/hir-ty/src/tests/coercion.rs16
1 files changed, 16 insertions, 0 deletions
diff --git a/crates/hir-ty/src/tests/coercion.rs b/crates/hir-ty/src/tests/coercion.rs
index 273571901a..7992f1feee 100644
--- a/crates/hir-ty/src/tests/coercion.rs
+++ b/crates/hir-ty/src/tests/coercion.rs
@@ -942,3 +942,19 @@ fn main() {
"#,
)
}
+
+#[test]
+fn regression_18626() {
+ check_no_mismatches(
+ r#"
+fn f() {
+ trait T {
+ fn f() {}
+ }
+ impl T for i32 {}
+ impl T for u32 {}
+ &[i32::f, u32::f] as &[fn()];
+}
+ "#,
+ );
+}