mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-27 05:49: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,9 +839,6 @@ fn write_integer<'a>(
|
||||||
|
|
||||||
macro_rules! derive_num_writes {
|
macro_rules! derive_num_writes {
|
||||||
($($lit:expr, $tag:path)*) => {
|
($($lit:expr, $tag:path)*) => {
|
||||||
write_parens!(
|
|
||||||
write_parens,
|
|
||||||
buf,
|
|
||||||
match content {
|
match content {
|
||||||
$(
|
$(
|
||||||
&Alias($tag, _, _, _) => {
|
&Alias($tag, _, _, _) => {
|
||||||
|
@ -849,13 +846,18 @@ fn write_integer<'a>(
|
||||||
},
|
},
|
||||||
)*
|
)*
|
||||||
actual => {
|
actual => {
|
||||||
|
write_parens!(
|
||||||
|
write_parens,
|
||||||
|
buf,
|
||||||
|
{
|
||||||
buf.push_str("Int ");
|
buf.push_str("Int ");
|
||||||
write_content(env, ctx, actual, subs, buf, parens);
|
write_content(env, ctx, actual, subs, buf, parens);
|
||||||
}
|
}
|
||||||
}
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
derive_num_writes! {
|
derive_num_writes! {
|
||||||
"U8", Symbol::NUM_UNSIGNED8
|
"U8", Symbol::NUM_UNSIGNED8
|
||||||
|
|
|
@ -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