test for bug

This commit is contained in:
gluax 2021-04-02 04:50:14 -04:00
parent 952ce8c17e
commit f44dcc1e96
2 changed files with 20 additions and 0 deletions

View File

@ -308,3 +308,11 @@ fn test_duplicate_name_context() {
assert_satisfied(program);
}
#[test]
fn test_mutable_call_immutable_context() {
let program_string = include_str!("mutable_call_immutable_context.leo");
let program = parse_program(program_string).unwrap();
assert_satisfied(program);
}

View File

@ -0,0 +1,12 @@
circuit TestMe {
x: u8,
function test_me(mut self) -> u8 {
self.x += 1;
return self.x
}
}
function main () {
const t = TestMe {x: 6u8}.test_me();
}