Merge branch 'main' into fuzzing-bugs-6

This commit is contained in:
Sam Mohr 2024-12-30 15:21:31 -05:00 committed by GitHub
commit 0e2f16887a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
31 changed files with 1472 additions and 654 deletions

View file

@ -0,0 +1,58 @@
@0-10 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@0-8,
],
space_before: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
space_after: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
spaces: [],
type_defs: [],
value_defs: [
Annotation(
@0-1 NumLiteral(
"8",
),
@2-8 Apply(
"",
"O",
[
@5-8 SpaceBefore(
Record {
fields: Collection {
items: [],
final_comments: [
Newline,
],
},
ext: None,
},
[
Newline,
],
),
],
),
),
],
},
@9-10 SpaceBefore(
Tag(
"Q",
),
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -0,0 +1,6 @@
N : f
-> ((
u,
)I
-> *)
I

View file

@ -0,0 +1,72 @@
@0-25 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(0),
],
regions: [
@0-23,
],
space_before: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
space_after: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
spaces: [],
type_defs: [
Alias {
header: TypeHeader {
name: @0-1 "N",
vars: [],
},
ann: @5-20 Function(
[
@5-6 BoundVariable(
"f",
),
],
Pure,
@8-20 Function(
[
@8-17 Tuple {
elems: [
@12-13 SpaceBefore(
BoundVariable(
"u",
),
[
Newline,
],
),
],
ext: Some(
@16-17 Apply(
"",
"I",
[],
),
),
},
],
Pure,
@19-20 Wildcard,
),
),
},
],
value_defs: [],
},
@24-25 SpaceBefore(
Tag(
"I",
),
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -0,0 +1,3 @@
N:(((f->(((
u)))I->*)))
I

View file

@ -0,0 +1,3 @@
mainForHost : [StdoutWrite Str ({} -> Op), StderrWrite Str ({} -> Op), Done] as Op
mainForHost = main
42

View file

@ -0,0 +1,112 @@
@0-104 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@0-101,
],
space_before: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
space_after: [
Slice<roc_parse::ast::CommentOrNewline> { start: 0, length: 0 },
],
spaces: [],
type_defs: [],
value_defs: [
AnnotatedBody {
ann_pattern: @0-11 Identifier {
ident: "mainForHost",
},
ann_type: @14-0 As(
@14-76 TagUnion {
ext: None,
tags: [
@15-41 Apply {
name: @15-26 "StdoutWrite",
args: [
@27-30 Apply(
"",
"Str",
[],
),
@32-40 Function(
[
@32-34 Record {
fields: [],
ext: None,
},
],
Pure,
@38-40 Apply(
"",
"Op",
[],
),
),
],
},
@43-69 Apply {
name: @43-54 "StderrWrite",
args: [
@55-58 Apply(
"",
"Str",
[],
),
@60-68 Function(
[
@60-62 Record {
fields: [],
ext: None,
},
],
Pure,
@66-68 Apply(
"",
"Op",
[],
),
),
],
},
@71-75 Apply {
name: @71-75 "Done",
args: [],
},
],
},
[],
TypeHeader {
name: @80-82 "Op",
vars: [],
},
),
lines_between: [
Newline,
],
body_pattern: @83-94 Identifier {
ident: "mainForHost",
},
body_expr: @97-101 Var {
module_name: "",
ident: "main",
},
},
],
},
@102-104 SpaceBefore(
Num(
"42",
),
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -0,0 +1,3 @@
mainForHost : [StdoutWrite Str ({} -> Op), StderrWrite Str ({} -> Op), Done] as Op
mainForHost = main
42

View file

@ -295,6 +295,7 @@ mod test_snapshots {
pass/alias_parens_comment.expr,
pass/alias_parens_comment_indent.expr,
pass/all_the_bangs.expr,
pass/ann_apply_record_with_newlines.expr,
pass/ann_closed_union.expr,
pass/ann_effectful_fn.expr,
pass/ann_open_union.expr,
@ -443,6 +444,7 @@ mod test_snapshots {
pass/fn_with_record_arg.expr,
pass/full_app_header.header,
pass/full_app_header_trailing_commas.header,
pass/func_ty_parens_crazyness.expr,
pass/function_effect_types.header,
pass/function_with_tuple_ext_type.expr,
pass/function_with_tuple_type.expr,
@ -697,6 +699,7 @@ mod test_snapshots {
pass/tag_destructure_bang_no_space.expr,
pass/tag_pattern.expr,
pass/tag_union_ann_with_as.expr,
pass/tag_union_functions_as.expr,
pass/ten_times_eleven.expr,
pass/three_arg_closure.expr,
pass/triple_paren_pat_ann.expr,
@ -787,13 +790,6 @@ mod test_snapshots {
true
}
"parens_newlines_before_as" | "tag_union_ann_with_as" => {
// Found unbound type variables {66}
// in type alias `Test.IdentId(0)` [] [] : <66>
// Location: crates/compiler/can/src/scope.rs:541:13
cfg!(debug_assertions)
}
// When adding new snapshot tests, strongly prefer fixing any canonicalization panics
// they may run into rather than adding them to this list.
_ => false,