mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 13:59:08 +00:00
Wrap int properly
This commit is contained in:
parent
4a214fe75b
commit
24b605a369
2 changed files with 17 additions and 15 deletions
|
@ -839,21 +839,23 @@ fn write_integer<'a>(
|
||||||
|
|
||||||
macro_rules! derive_num_writes {
|
macro_rules! derive_num_writes {
|
||||||
($($lit:expr, $tag:path)*) => {
|
($($lit:expr, $tag:path)*) => {
|
||||||
write_parens!(
|
match content {
|
||||||
write_parens,
|
$(
|
||||||
buf,
|
&Alias($tag, _, _, _) => {
|
||||||
match content {
|
buf.push_str($lit)
|
||||||
$(
|
},
|
||||||
&Alias($tag, _, _, _) => {
|
)*
|
||||||
buf.push_str($lit)
|
actual => {
|
||||||
},
|
write_parens!(
|
||||||
)*
|
write_parens,
|
||||||
actual => {
|
buf,
|
||||||
buf.push_str("Int ");
|
{
|
||||||
write_content(env, ctx, actual, subs, buf, parens);
|
buf.push_str("Int ");
|
||||||
}
|
write_content(env, ctx, actual, subs, buf, parens);
|
||||||
|
}
|
||||||
|
)
|
||||||
}
|
}
|
||||||
)
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -301,7 +301,7 @@ fn nested_num_list() {
|
||||||
fn nested_int_list() {
|
fn nested_int_list() {
|
||||||
expect_success(
|
expect_success(
|
||||||
r#"[[[4, 3, 2], [1, 0x0]], [[]], []]"#,
|
r#"[[[4, 3, 2], [1, 0x0]], [[]], []]"#,
|
||||||
r#"[[[4, 3, 2], [1, 0]], [[]], []] : List (List (List Int *))"#,
|
r#"[[[4, 3, 2], [1, 0]], [[]], []] : List (List (List (Int *)))"#,
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue