//! > Test for.

//! > test_runner_name
test_function_lowering(expect_diagnostics: false)

//! > function_code
fn foo() -> felt252 {
    let x = 1;
    let y = x + 1;
    let mut iter = array![10, 11, 12, 13_felt252].span();
    for _x in iter {
        1;
    }
    y
}

//! > function_name
foo

//! > semantic_diagnostics

//! > lowering_diagnostics

//! > lowering_flat
Parameters: v0: core::RangeCheck, v1: core::gas::GasBuiltin
blk0 (root):
Statements:
  (v2: core::array::Array::<core::felt252>) <- core::array::array_new::<core::felt252>()
  (v3: core::felt252) <- 10
  (v4: core::array::Array::<core::felt252>) <- core::array::array_append::<core::felt252>(v2, v3)
  (v5: core::felt252) <- 11
  (v6: core::array::Array::<core::felt252>) <- core::array::array_append::<core::felt252>(v4, v5)
  (v7: core::felt252) <- 12
  (v8: core::array::Array::<core::felt252>) <- core::array::array_append::<core::felt252>(v6, v7)
  (v9: core::felt252) <- 13
  (v10: core::array::Array::<core::felt252>) <- core::array::array_append::<core::felt252>(v8, v9)
  (v11: core::array::Array::<core::felt252>, v12: @core::array::Array::<core::felt252>) <- snapshot(v10)
  (v13: core::array::Span::<core::felt252>) <- struct_construct(v12)
  (v14: core::array::SpanIter::<core::felt252>) <- struct_construct(v13)
  (v15: core::RangeCheck, v16: core::gas::GasBuiltin, v17: core::panics::PanicResult::<(core::array::SpanIter::<core::felt252>, ())>) <- test::foo[114-152](v0, v1, v14)
End:
  Match(match_enum(v17) {
    PanicResult::Ok(v18) => blk1,
    PanicResult::Err(v19) => blk2,
  })

blk1:
Statements:
  (v20: core::gas::GasBuiltin) <- core::gas::redeposit_gas(v16)
  (v21: core::felt252) <- 2
  (v22: (core::felt252,)) <- struct_construct(v21)
  (v23: core::panics::PanicResult::<(core::felt252,)>) <- PanicResult::Ok(v22)
End:
  Return(v15, v20, v23)

blk2:
Statements:
  (v24: core::panics::PanicResult::<(core::felt252,)>) <- PanicResult::Err(v19)
End:
  Return(v15, v16, v24)
