This commit is contained in:
Protryon 2021-02-02 18:42:00 -08:00
parent b078c6e09f
commit abee76680b
2 changed files with 14 additions and 0 deletions

View File

@ -0,0 +1,6 @@
function main () {
let mut x = true;
if x {
let y = 0u8;
}
}

View File

@ -101,6 +101,14 @@ fn test_not_mutable() {
assert_satisfied(program);
}
#[test]
fn test_conditional_mut() {
let program_string = include_str!("conditional_mut.leo");
let program = parse_program(program_string).unwrap();
assert_satisfied(program);
}
#[test]
fn test_not_u32() {
let program_string = include_str!("not_u32.leo");