add failing test for ignored fields canonicalization

This commit is contained in:
Joshua Warner 2025-01-10 21:46:20 -08:00
parent 408379f8d3
commit 7d464a2989
No known key found for this signature in database
GPG key ID: 89AD497003F93FDD
7 changed files with 217 additions and 3 deletions

View file

@ -0,0 +1,4 @@
import P {
_: h,
}
t!

View file

@ -0,0 +1,67 @@
@0-17 SpaceAfter(
Defs(
Defs {
tags: [
EitherIndex(2147483648),
],
regions: [
@0-14,
],
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: [
ModuleImport(
ModuleImport {
before_name: [],
name: @7-8 ImportedModuleName {
package: None,
name: ModuleName(
"P",
),
},
params: Some(
ModuleImportParams {
before: [],
params: @8-14 [
@9-12 SpaceAfter(
IgnoredValue(
@9-10 "",
[],
@11-12 Var {
module_name: "",
ident: "h",
},
),
[
Newline,
],
),
],
},
),
alias: None,
exposed: None,
},
),
],
},
@15-17 SpaceBefore(
Var {
module_name: "",
ident: "t!",
},
[
Newline,
],
),
),
[
Newline,
],
)

View file

@ -0,0 +1,3 @@
import P{_:h
}
t!

View file

@ -357,6 +357,7 @@ mod test_snapshots {
pass/body_with_unneeded_parens.expr,
pass/call_bang.expr,
pass/call_bang_no_space.expr,
pass/can_ignored_field_in_import.expr,
pass/capture_body_parens_comment.expr,
pass/closure_arg_parens_then_comment.expr,
pass/closure_complex_pattern_indent_issue.expr,