fix compiler issues

This commit is contained in:
Nilton Constantino
2026-01-30 17:28:04 +00:00
parent 926ad2a807
commit e2a5a08bf2
12 changed files with 137 additions and 37 deletions
+5 -1
View File
@@ -146,7 +146,7 @@ mod tests {
assert_eq!(func.name, "start");
assert_eq!(func.id, FunctionId(10));
assert_eq!(func.body.len(), 3);
assert_eq!(func.body.len(), 4);
match &func.body[0].kind {
InstrKind::Label(Label(l)) => assert!(l.contains("block_0")),
_ => panic!("Expected label"),
@@ -156,6 +156,10 @@ mod tests {
_ => panic!("Expected PushConst"),
}
match &func.body[2].kind {
InstrKind::PushNull => (),
_ => panic!("Expected PushNull"),
}
match &func.body[3].kind {
InstrKind::Ret => (),
_ => panic!("Expected Ret"),
}