mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 19:58:18 +00:00
merge remote/main, fix merge conflicts, update mono
This commit is contained in:
commit
15b7b62c4f
45 changed files with 850 additions and 638 deletions
|
@ -932,6 +932,29 @@ fn encode_derived_generic_tag_with_different_field_types() {
|
|||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn specialize_unique_newtype_records() {
|
||||
assert_evals_to!(
|
||||
indoc!(
|
||||
r#"
|
||||
app "test"
|
||||
imports [Encode, Json]
|
||||
provides [main] to "./platform"
|
||||
|
||||
main =
|
||||
when Str.fromUtf8 (Encode.toBytes {a: Bool.true} Json.json) is
|
||||
Ok s -> when Str.fromUtf8 (Encode.toBytes {b: Bool.true} Json.json) is
|
||||
Ok t -> "\(s)\(t)"
|
||||
_ -> "<bad>"
|
||||
_ -> "<bad>"
|
||||
"#
|
||||
),
|
||||
RocStr::from(r#"{"a":true}{"b":true}"#),
|
||||
RocStr
|
||||
)
|
||||
}
|
||||
|
||||
#[test]
|
||||
#[cfg(any(feature = "gen-llvm", feature = "gen-wasm"))]
|
||||
fn decode_use_stdlib() {
|
||||
|
|
|
@ -27,7 +27,7 @@ fn width_and_alignment_u8_u8() {
|
|||
let t = &[Layout::U8] as &[_];
|
||||
let tt = [t, t];
|
||||
|
||||
let layout = Layout::no_semantic(LayoutRepr::Union(UnionLayout::NonRecursive(&tt)));
|
||||
let layout = LayoutRepr::Union(UnionLayout::NonRecursive(&tt));
|
||||
|
||||
assert_eq!(layout.alignment_bytes(&interner, target_info), 1);
|
||||
assert_eq!(layout.stack_size(&interner, target_info), 2);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue