merge remote/main, fix merge conflicts, update mono

This commit is contained in:
Luke Boswell 2023-06-08 19:41:53 +10:00
commit 15b7b62c4f
No known key found for this signature in database
GPG key ID: F6DB3C9DB47377B0
45 changed files with 850 additions and 638 deletions

View file

@ -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() {

View file

@ -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);