feat: improve parser error recovery for function parameters

This commit is contained in:
Aleksey Kladov 2021-07-17 22:41:04 +03:00
parent a2f83c956e
commit 15f11dce4a
10 changed files with 106 additions and 21 deletions

View file

@ -101,6 +101,20 @@ fn baz(file$0) {}
);
}
#[test]
fn test_param_completion_first_param() {
check(
r#"
fn foo(file_id: FileId) {}
fn bar(file_id: FileId) {}
fn baz(file$0 id: u32) {}
"#,
expect![[r#"
bn file_id: FileId
"#]],
);
}
#[test]
fn test_param_completion_nth_param() {
check(