move record index to start of update

This commit is contained in:
J.Teeuwissen 2023-05-27 14:42:37 +02:00
parent 9b58c0fb9c
commit 378a298b45
No known key found for this signature in database
GPG key ID: DB5F7A1ED8D478AD
6 changed files with 291 additions and 106 deletions

View file

@ -3013,3 +3013,17 @@ fn rb_tree_fbip() {
"#
)
}
#[mono_test]
fn record_update() {
indoc!(
r#"
app "test" provides [main] to "./platform"
main = f {a: [], b: [], c:[]}
f : {a: List Nat, b: List Nat, c: List Nat} -> {a: List Nat, b: List Nat, c: List Nat}
f = \record -> {record & a: List.set record.a 7 7, b: List.set record.b 8 8}
"#
)
}