Skip to content

Commit c7f287f

Browse files
committed
Fix rebase
1 parent 89b9789 commit c7f287f

File tree

3 files changed

+38
-30
lines changed

3 files changed

+38
-30
lines changed

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11167,8 +11167,10 @@ fn merge_case_branch_does_not_merge_branches_with_variables_with_same_name_and_d
1116711167
}
1116811168
}"#,
1116911169
find_position_of("Ok").select_until(find_position_of("Error"))
11170+
);
1117011171
}
1117111172

11173+
#[test]
1117211174
fn annotate_all_top_level_definitions_dont_affect_local_vars() {
1117311175
assert_code_action!(
1117411176
ANNOTATE_TOP_LEVEL_DEFINITIONS,
@@ -11177,13 +11179,15 @@ pub const answer = 42
1117711179
1117811180
pub fn add_two(thing) {
1117911181
thing + 2
11182+
}
1118011183
1118111184
pub fn add_one(thing) {
1118211185
let result = thing + 1
1118311186
result
1118411187
}
1118511188
"#,
11186-
find_position_of("fn").select_until(find_position_of("("));
11189+
find_position_of("fn").select_until(find_position_of("("))
11190+
);
1118711191
}
1118811192

1118911193
#[test]

compiler-core/src/language_server/tests/snapshots/gleam_core__language_server__tests__action__add_multiple_annotations.snap.new

Lines changed: 0 additions & 29 deletions
This file was deleted.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
---
2+
source: compiler-core/src/language_server/tests/action.rs
3+
assertion_line: 11175
4+
expression: "\npub const answer = 42\n\npub fn add_two(thing) {\n thing + 2\n}\n\npub fn add_one(thing) {\n let result = thing + 1\n result\n}\n"
5+
snapshot_kind: text
6+
---
7+
----- BEFORE ACTION
8+
9+
pub const answer = 42
10+
11+
pub fn add_two(thing) {
12+
▔▔▔▔▔▔▔▔▔▔↑
13+
thing + 2
14+
}
15+
16+
pub fn add_one(thing) {
17+
let result = thing + 1
18+
result
19+
}
20+
21+
22+
----- AFTER ACTION
23+
24+
pub const answer: Int = 42
25+
26+
pub fn add_two(thing: Int) -> Int {
27+
thing + 2
28+
}
29+
30+
pub fn add_one(thing: Int) -> Int {
31+
let result = thing + 1
32+
result
33+
}

0 commit comments

Comments
 (0)