//! > Test function call.
//! > test_runner_name
test_function_lowering(expect_diagnostics: false)
//! > function
fn foo(ref a: felt252) -> felt252 {
let b = true;
if true {
bar(ref a, b);
} else {}
if false {
return 6;
} else {}
5
}
//! > function_name
foo
//! > module_code
#[inline(never)]
fn bar(ref a: felt252, b: bool) {}
//! > semantic_diagnostics
//! > lowering_diagnostics
//! > lowering_flat
Parameters: v0: core::felt252
blk0 (root):
Statements:
(v1: ()) <- struct_construct()
(v2: core::bool) <- bool::True(v1)
(v3: core::felt252) <- test::bar(v0, v2)
(v4: core::felt252) <- 5
End:
Return(v3, v4)
//! > ==========================================================================
//! > Test method call.
//! > test_runner_name
test_function_lowering(expect_diagnostics: false)
//! > function
fn foo() -> Option::<felt252> {
let x = Option::None;
let _ = x.is_some();
x
}
//! > function_name
foo
//! > module_code
//! > semantic_diagnostics
//! > lowering_diagnostics
//! > lowering_flat
Parameters:
blk0 (root):
Statements:
(v0: ()) <- struct_construct()
(v1: core::option::Option::<core::felt252>) <- Option::None(v0)
End:
Return(v1)