mirror of
https://github.com/roc-lang/roc.git
synced 2025-10-03 16:44:33 +00:00
fix off by one in roc_dbg
This commit is contained in:
parent
497d7755c8
commit
e8d2deca90
3 changed files with 8 additions and 6 deletions
|
@ -562,11 +562,12 @@ mod cli_run {
|
||||||
words : List Str
|
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"]
|
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] 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>:23] "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>:24] "this is line 24" = "this is line 24"
|
||||||
[<ignored for tests>:12] x = 10
|
[<ignored for tests>:13] x = "abc"
|
||||||
[<ignored for tests>:12] x = (A (B C))
|
[<ignored for tests>:13] x = 10
|
||||||
|
[<ignored for tests>:13] x = (A (B C))
|
||||||
Program finished!
|
Program finished!
|
||||||
"#
|
"#
|
||||||
),
|
),
|
||||||
|
|
|
@ -21,6 +21,7 @@ main =
|
||||||
x = 42
|
x = 42
|
||||||
dbg x
|
dbg x
|
||||||
dbg "Fjoer en ferdjer frieten oan dyn geve lea"
|
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))}
|
r = {x : polyDbg "abc", y: polyDbg 10u8, z : polyDbg (A (B C))}
|
||||||
|
|
||||||
|
|
|
@ -661,7 +661,7 @@ pub fn desugar_expr<'a>(
|
||||||
arena.alloc(Loc {
|
arena.alloc(Loc {
|
||||||
value: LowLevelDbg(
|
value: LowLevelDbg(
|
||||||
arena.alloc((
|
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),
|
&*arena.alloc_str(dbg_src),
|
||||||
)),
|
)),
|
||||||
dbg_str,
|
dbg_str,
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue