mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-27 02:24:15 +03:00
add test for the fixed bug
This commit is contained in:
parent
1898cc6840
commit
9651af3089
13
compiler/tests/circuits/duplicate_name_context.leo
Normal file
13
compiler/tests/circuits/duplicate_name_context.leo
Normal file
@ -0,0 +1,13 @@
|
||||
circuit Bar {
|
||||
b2: u32
|
||||
|
||||
function add_five(z:u32) -> u32 {
|
||||
return z+5u32
|
||||
}
|
||||
}
|
||||
|
||||
function main () {
|
||||
let Bar = 66u32;
|
||||
const k1 = Bar{ b2: 30u32 };
|
||||
const k2 = Bar::add_five(55u32);
|
||||
}
|
@ -283,3 +283,11 @@ fn test_define_circuit_inside_circuit_function() {
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_duplicate_name_context() {
|
||||
let program_string = include_str!("duplicate_name_context.leo");
|
||||
let program = parse_program(program_string).unwrap();
|
||||
|
||||
assert_satisfied(program);
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user