fix: attrset update

This commit is contained in:
2025-05-03 14:23:24 +08:00
parent 5e35da49ef
commit 43cfb9be62
2 changed files with 3 additions and 8 deletions

View File

@@ -144,7 +144,7 @@ fn test_attrs() {
test_expr("{ a.b = 1; } ? a.b", boolean!(true));
test_expr(
"{ a.b = 1; } // { a.c = 2 }",
attrs! { symbol!("a") => attrs!{ symbol!("b") => int!(1), symbol!("c") => int!(2) } },
attrs! { symbol!("a") => attrs!{ symbol!("c") => int!(2) } },
);
}
@@ -164,6 +164,6 @@ fn test_let() {
test_expr(r#"let a = { a = 1; }; b = "a"; in a.${b}"#, int!(1));
test_expr(
r#"let b = "c"; in { a.b = 1; } // { a."a${b}" = 2 }"}"#,
attrs! { symbol!("a") => attrs!{ symbol!("b") => int!(1), symbol!("ac") => int!(2) } },
attrs! { symbol!("a") => attrs!{ symbol!("ac") => int!(2) } },
);
}