Merge branch 'main' into inline-imports

This commit is contained in:
Agus Zubiaga 2024-04-22 17:45:25 -03:00
commit 4476277a56
No known key found for this signature in database
28 changed files with 142 additions and 84 deletions

View file

@ -2,9 +2,9 @@
name = "test_syntax-fuzz"
publish = false
authors.workspace = true
edition.workspace = true
version.workspace = true
version = "0.0.0"
authors = ["Automatically generated"]
edition = "2021"
[package.metadata]
cargo-fuzz = true
@ -12,8 +12,8 @@ cargo-fuzz = true
[dependencies]
test_syntax = { path = "../../test_syntax" }
bumpalo.workspace = true
libfuzzer-sys.workspace = true
bumpalo = { version = "3.12.0", features = ["collections"] }
libfuzzer-sys = "0.4"
# Prevent this from interfering with workspaces
[workspace]

View file

@ -0,0 +1,54 @@
When(
@5-10 Apply(
@5-7 Tag(
"Ok",
),
[
@8-10 List(
[],
),
],
Space,
),
[
WhenBranch {
patterns: [
@18-23 SpaceBefore(
Apply(
@18-20 Tag(
"Ok",
),
[
@21-23 List(
[],
),
],
),
[
Newline,
],
),
],
value: @27-29 Record(
[],
),
guard: None,
},
WhenBranch {
patterns: [
@34-35 SpaceBefore(
Underscore(
"",
),
[
Newline,
],
),
],
value: @39-41 Record(
[],
),
guard: None,
},
],
)

View file

@ -0,0 +1,3 @@
when Ok [] is
Ok [] -> {}
_ -> {}

View file

@ -491,6 +491,7 @@ mod test_snapshots {
pass/when_in_function_python_style_indent.expr,
pass/when_in_parens.expr,
pass/when_in_parens_indented.expr,
pass/when_result_list.expr,
pass/when_with_alternative_patterns.expr,
pass/when_with_function_application.expr,
pass/when_with_negative_numbers.expr,