Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs')
-rw-r--r--crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs14
1 files changed, 14 insertions, 0 deletions
diff --git a/crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs b/crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs
index 56ec45c898..7126617cde 100644
--- a/crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs
+++ b/crates/ide-diagnostics/src/handlers/mismatched_arg_count.rs
@@ -472,4 +472,18 @@ fn f(
"#,
)
}
+
+ #[test]
+ fn no_type_mismatches_when_arg_count_mismatch() {
+ check_diagnostics(
+ r#"
+fn foo((): (), (): ()) {
+ foo(1, 2, 3);
+ // ^^ error: expected 2 arguments, found 3
+ foo(1);
+ // ^ error: expected 2 arguments, found 1
+}
+"#,
+ );
+ }
}