mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +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 {
|
||||
($($lit:expr, $tag:path)*) => {
|
||||
write_parens!(
|
||||
write_parens,
|
||||
buf,
|
||||
match content {
|
||||
$(
|
||||
&Alias($tag, _, _, _) => {
|
||||
buf.push_str($lit)
|
||||
},
|
||||
)*
|
||||
actual => {
|
||||
buf.push_str("Int ");
|
||||
write_content(env, ctx, actual, subs, buf, parens);
|
||||
}
|
||||
match content {
|
||||
$(
|
||||
&Alias($tag, _, _, _) => {
|
||||
buf.push_str($lit)
|
||||
},
|
||||
)*
|
||||
actual => {
|
||||
write_parens!(
|
||||
write_parens,
|
||||
buf,
|
||||
{
|
||||
buf.push_str("Int ");
|
||||
write_content(env, ctx, actual, subs, buf, parens);
|
||||
}
|
||||
)
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -301,7 +301,7 @@ fn nested_num_list() {
|
|||
fn nested_int_list() {
|
||||
expect_success(
|
||||
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