mirror of
https://github.com/ProvableHQ/leo.git
synced 2024-11-24 07:48:04 +03:00
add test for bug #427 incomplete conditional
This commit is contained in:
parent
dfcc77a860
commit
87c0dd738a
@ -78,6 +78,14 @@ fn test_multiple_returns_fail() {
|
||||
expect_compiler_error(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_multiple_returns_fail_conditional() {
|
||||
let bytes = include_bytes!("multiple_returns_fail_conditional.leo");
|
||||
let program = parse_program(bytes).unwrap();
|
||||
|
||||
expect_compiler_error(program);
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_multiple_returns_main() {
|
||||
let program_bytes = include_bytes!("multiple_returns_main.leo");
|
||||
|
@ -0,0 +1,9 @@
|
||||
function main () -> u16 {
|
||||
if false {
|
||||
let a = 1u16;
|
||||
let b = a + 1u16;
|
||||
return b
|
||||
} else if false {
|
||||
return 0u16
|
||||
}
|
||||
}
|
Loading…
Reference in New Issue
Block a user