-
-
Notifications
You must be signed in to change notification settings - Fork 759
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
c3c4d13
commit 9b19288
Showing
4 changed files
with
45 additions
and
45 deletions.
There are no files selected for viewing
14 changes: 7 additions & 7 deletions
14
...language_server__tests__action__inexhaustive_let_string_prefix_pattern_alias_to_case.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
--- | ||
source: compiler-core/src/language_server/tests/action.rs | ||
expression: "pub fn main() {\n let \"123\" as one_two_three <> rest = \"123456\"\n}" | ||
expression: "pub fn main() {\n let \"123\" as one_two_three <> rest = \"123456\"\n}" | ||
--- | ||
----- BEFORE ACTION | ||
pub fn main() { | ||
let "123" as one_two_three <> rest = "123456" | ||
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔↑ | ||
let "123" as one_two_three <> rest = "123456" | ||
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔↑ | ||
} | ||
|
||
|
||
----- AFTER ACTION | ||
pub fn main() { | ||
let #(one_two_three, rest) = case "123456" { | ||
"123" as one_two_three <> rest -> #(one_two_three, rest) | ||
_ -> todo | ||
} | ||
let #(one_two_three, rest) = case "123456" { | ||
"123" as one_two_three <> rest -> #(one_two_three, rest) | ||
_ -> todo | ||
} | ||
} |
14 changes: 7 additions & 7 deletions
14
...snapshots/gleam_core__language_server__tests__action__inexhaustive_let_tuple_to_case.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
--- | ||
source: compiler-core/src/language_server/tests/action.rs | ||
expression: "pub fn main() {\n let #(first, 10, third) = #(5, 10, 15)\n}\n" | ||
expression: "pub fn main() {\n let #(first, 10, third) = #(5, 10, 15)\n}\n" | ||
--- | ||
----- BEFORE ACTION | ||
pub fn main() { | ||
let #(first, 10, third) = #(5, 10, 15) | ||
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔↑ | ||
let #(first, 10, third) = #(5, 10, 15) | ||
▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔↑ | ||
} | ||
|
||
|
||
----- AFTER ACTION | ||
pub fn main() { | ||
let #(first, third) = case #(5, 10, 15) { | ||
#(first, 10, third) -> #(first, third) | ||
#(_, _, _) -> todo | ||
} | ||
let #(first, third) = case #(5, 10, 15) { | ||
#(first, 10, third) -> #(first, third) | ||
#(_, _, _) -> todo | ||
} | ||
} |
30 changes: 15 additions & 15 deletions
30
...snapshots/gleam_core__language_server__tests__action__inner_inexhaustive_let_to_case.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,28 @@ | ||
--- | ||
source: compiler-core/src/language_server/tests/action.rs | ||
expression: "pub fn main(result) {\n let [wibble] = {\n let Ok(wobble) = {\n result\n }\n [wobble]\n }\n}" | ||
expression: "pub fn main(result) {\n let [wibble] = {\n let Ok(wobble) = {\n result\n }\n [wobble]\n }\n}" | ||
--- | ||
----- BEFORE ACTION | ||
pub fn main(result) { | ||
let [wibble] = { | ||
let Ok(wobble) = { | ||
▔▔▔▔▔▔▔▔▔▔▔▔▔↑ | ||
result | ||
} | ||
[wobble] | ||
let [wibble] = { | ||
let Ok(wobble) = { | ||
▔▔▔▔▔▔▔▔▔▔▔▔▔↑ | ||
result | ||
} | ||
[wobble] | ||
} | ||
} | ||
|
||
|
||
----- AFTER ACTION | ||
pub fn main(result) { | ||
let [wibble] = { | ||
let wobble = case { | ||
result | ||
} { | ||
Ok(wobble) -> wobble | ||
Error(_) -> todo | ||
} | ||
[wobble] | ||
let [wibble] = { | ||
let wobble = case { | ||
result | ||
} { | ||
Ok(wobble) -> wobble | ||
Error(_) -> todo | ||
} | ||
[wobble] | ||
} | ||
} |
32 changes: 16 additions & 16 deletions
32
...snapshots/gleam_core__language_server__tests__action__outer_inexhaustive_let_to_case.snap
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,29 @@ | ||
--- | ||
source: compiler-core/src/language_server/tests/action.rs | ||
expression: "pub fn main(result) {\n let [wibble] = {\n let Ok(wobble) = {\n result\n }\n [wobble]\n }\n}" | ||
expression: "pub fn main(result) {\n let [wibble] = {\n let Ok(wobble) = {\n result\n }\n [wobble]\n }\n}" | ||
--- | ||
----- BEFORE ACTION | ||
pub fn main(result) { | ||
let [wibble] = { | ||
▔▔▔▔▔▔▔▔▔▔▔↑ | ||
let Ok(wobble) = { | ||
result | ||
} | ||
[wobble] | ||
let [wibble] = { | ||
▔▔▔▔▔▔▔▔▔▔▔↑ | ||
let Ok(wobble) = { | ||
result | ||
} | ||
[wobble] | ||
} | ||
} | ||
|
||
|
||
----- AFTER ACTION | ||
pub fn main(result) { | ||
let wibble = case { | ||
let Ok(wobble) = { | ||
result | ||
} | ||
[wobble] | ||
} { | ||
[wibble] -> wibble | ||
[] -> todo | ||
[_, _, ..] -> todo | ||
let wibble = case { | ||
let Ok(wobble) = { | ||
result | ||
} | ||
[wobble] | ||
} { | ||
[wibble] -> wibble | ||
[] -> todo | ||
[_, _, ..] -> todo | ||
} | ||
} |