Skip to content

Commit 2666e6e

Browse files
committed
Add test for LetElse case.
Postfix completion is not triggered.
1 parent 8535f2b commit 2666e6e

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

crates/ide-completion/src/completions/postfix.rs

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -571,6 +571,13 @@ fn main() {
571571
r#"fn main() { let x = if true {1} else {2}.$0 }"#,
572572
r#"fn main() { let x = unsafe { if true {1} else {2} } }"#,
573573
);
574+
575+
// completion will not be triggered
576+
check_edit(
577+
"unsafe",
578+
r#"fn main() { let x = true else {panic!()}.$0}"#,
579+
r#"fn main() { let x = true else {panic!()}.unsafe}"#,
580+
);
574581
}
575582

576583
#[test]

0 commit comments

Comments
 (0)