mirror of
https://github.com/roc-lang/roc.git
synced 2024-10-26 10:17:51 +03:00
Merge pull request #6166 from roc-lang/dbg-off-by-one
fix off by one in roc_dbg
This commit is contained in:
commit
7db2594be4
@ -562,11 +562,12 @@ mod cli_run {
|
||||
words : List Str
|
||||
words = ["this", "will", "for", "sure", "be", "a", "large", "string", "so", "when", "we", "split", "it", "it", "will", "use", "seamless", "slices", "which", "affect", "printing"]
|
||||
|
||||
[<ignored for tests>:21] x = 42
|
||||
[<ignored for tests>:22] "Fjoer en ferdjer frieten oan dyn geve lea" = "Fjoer en ferdjer frieten oan dyn geve lea"
|
||||
[<ignored for tests>:12] x = "abc"
|
||||
[<ignored for tests>:12] x = 10
|
||||
[<ignored for tests>:12] x = (A (B C))
|
||||
[<ignored for tests>:22] x = 42
|
||||
[<ignored for tests>:23] "Fjoer en ferdjer frieten oan dyn geve lea" = "Fjoer en ferdjer frieten oan dyn geve lea"
|
||||
[<ignored for tests>:24] "this is line 24" = "this is line 24"
|
||||
[<ignored for tests>:13] x = "abc"
|
||||
[<ignored for tests>:13] x = 10
|
||||
[<ignored for tests>:13] x = (A (B C))
|
||||
Program finished!
|
||||
"#
|
||||
),
|
||||
|
@ -21,6 +21,7 @@ main =
|
||||
x = 42
|
||||
dbg x
|
||||
dbg "Fjoer en ferdjer frieten oan dyn geve lea"
|
||||
dbg "this is line 24"
|
||||
|
||||
r = {x : polyDbg "abc", y: polyDbg 10u8, z : polyDbg (A (B C))}
|
||||
|
||||
|
@ -661,7 +661,7 @@ pub fn desugar_expr<'a>(
|
||||
arena.alloc(Loc {
|
||||
value: LowLevelDbg(
|
||||
arena.alloc((
|
||||
&*arena.alloc_str(&format!("{}:{}", module_path, line_col.line)),
|
||||
&*arena.alloc_str(&format!("{}:{}", module_path, line_col.line + 1)),
|
||||
&*arena.alloc_str(dbg_src),
|
||||
)),
|
||||
dbg_str,
|
||||
|
Loading…
Reference in New Issue
Block a user