Skip to content

Commit 5ec0c66

Browse files
giacomocavalierilpil
authored andcommitted
forgot a test
1 parent eaa0630 commit 5ec0c66

File tree

2 files changed

+24
-1
lines changed

2 files changed

+24
-1
lines changed

compiler-core/src/language_server/tests/action.rs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9185,7 +9185,7 @@ fn allow_further_pattern_matching_on_let_record_destructuring() {
91859185
91869186
pub type Wibble { Wibble(field: Result(Nil, String)) }
91879187
",
9188-
find_position_of("one").to_selection()
9188+
find_position_of("field").to_selection()
91899189
);
91909190
}
91919191

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
---
2+
source: compiler-core/src/language_server/tests/action.rs
3+
expression: "pub fn main(x) {\n let Wibble(field:) = Wibble(Ok(Nil))\n}\n\npub type Wibble { Wibble(field: Result(Nil, String)) }\n"
4+
---
5+
----- BEFORE ACTION
6+
pub fn main(x) {
7+
let Wibble(field:) = Wibble(Ok(Nil))
8+
9+
}
10+
11+
pub type Wibble { Wibble(field: Result(Nil, String)) }
12+
13+
14+
----- AFTER ACTION
15+
pub fn main(x) {
16+
let Wibble(field:) = Wibble(Ok(Nil))
17+
case field {
18+
Ok(value) -> todo
19+
Error(value) -> todo
20+
}
21+
}
22+
23+
pub type Wibble { Wibble(field: Result(Nil, String)) }

0 commit comments

Comments
 (0)