emit negated declarations

This commit is contained in:
2025-11-22 22:44:25 -07:00
parent 1706698ffa
commit 17089b53e1
6 changed files with 560 additions and 27 deletions

View File

@@ -62,3 +62,26 @@ fn variable_declaration_numeric_literal_stack_spillover() -> anyhow::Result<()>
Ok(())
}
#[test]
fn variable_declaration_negative() -> anyhow::Result<()> {
let compiled = compile! {
debug
"
let i = -1;
"
};
assert_eq!(
compiled,
indoc! {
"
j main
main:
move r8 -1 #i
"
}
);
Ok(())
}