//! > Test assignment.
//! > test_runner_name
test_function_lowering
//! > function
fn foo(a: bool) -> felt252 {
let mut x = 2;
if a { x = 3; } else { let mut y = 4; y = 5; }
x
}
//! > function_name
foo
//! > module_code
//! > semantic_diagnostics
//! > lowering_diagnostics
//! > lowering_flat
Parameters: v0: core::bool
blk0 (root):
Statements:
End:
Match(match_enum(v0) {
bool::False(v4) => blk1,
bool::True(v2) => blk2,
})
blk1:
Statements:
(v1: core::felt252) <- 2u
End:
Goto(blk3, {v1 -> v7})
blk2:
Statements:
(v3: core::felt252) <- 3u
End:
Goto(blk3, {v3 -> v7})
blk3:
Statements:
End:
Return(v7)