mirror of
https://github.com/roc-lang/roc.git
synced 2025-11-02 22:01:20 +00:00
Disallow simplifying empty assignment of dbg
This commit is contained in:
parent
59fe0f06ea
commit
d8d0b6ebb1
6 changed files with 72 additions and 2 deletions
|
|
@ -0,0 +1,4 @@
|
|||
{} =
|
||||
dbg c
|
||||
c
|
||||
e
|
||||
|
|
@ -0,0 +1,60 @@
|
|||
@0-15 SpaceAfter(
|
||||
Defs(
|
||||
Defs {
|
||||
tags: [
|
||||
EitherIndex(2147483648),
|
||||
],
|
||||
regions: [
|
||||
@0-13,
|
||||
],
|
||||
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: [
|
||||
Body(
|
||||
@0-2 RecordDestructure(
|
||||
[],
|
||||
),
|
||||
@5-10 SpaceBefore(
|
||||
DbgStmt {
|
||||
first: @9-10 Var {
|
||||
module_name: "",
|
||||
ident: "c",
|
||||
},
|
||||
extra_args: [],
|
||||
continuation: @12-13 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "c",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
],
|
||||
},
|
||||
@14-15 SpaceBefore(
|
||||
Var {
|
||||
module_name: "",
|
||||
ident: "e",
|
||||
},
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
),
|
||||
),
|
||||
[
|
||||
Newline,
|
||||
],
|
||||
)
|
||||
|
|
@ -0,0 +1,4 @@
|
|||
{}=
|
||||
dbg c
|
||||
c
|
||||
e
|
||||
|
|
@ -420,6 +420,7 @@ mod test_snapshots {
|
|||
pass/empty_platform_header.header,
|
||||
pass/empty_record.expr,
|
||||
pass/empty_record_assign_backpassing.expr,
|
||||
pass/empty_record_assign_dbg.expr,
|
||||
pass/empty_record_assign_implements.expr,
|
||||
pass/empty_record_assign_return.expr,
|
||||
pass/empty_record_assign_tag.expr,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue