//! > Test lowering diagnostics propagation from item macro

//! > test_runner_name
test_function_lowering

//! > function_code
fn foo() {}

//! > function_name
foo

//! > module_code
macro generate_unreachable {
    () => {
        fn unreachable_code() {
            return ();
            let _x = 5;
        }
    };
}
generate_unreachable!();

//! > semantic_diagnostics

//! > lowering_diagnostics
warning[E3000]: Unreachable code
 --> lib.cairo:9:1
generate_unreachable!();
^^^^^^^^^^^^^^^^^^^^^^^^

//! > lowering_flat
Parameters:
blk0 (root):
Statements:
End:
  Return()

//! > lowering
fn unreachable_code() {
    return ();
    let x = 5;
}
