//! > Basic cache valid.

//! > test_runner_name
test_cache_check

//! > function
fn foo(x: ACopy, y: ADrop) {
    if true {
        use_a_copy(x);
        use_a_drop(y);
    } else {
        use_a_drop(y);
    }
    use_a_copy(x);
}

//! > function_name
foo

//! > module_code
extern type ACopy;
impl ACopyCopy of Copy<ACopy>;
extern type ADrop;
impl ADropDrop of Drop<ADrop>;

extern fn use_a_copy(x: ACopy) nopanic;
extern fn use_a_drop(x: ADrop) nopanic;

//! > semantic_diagnostics

//! > lowering_diagnostics

//! > lowering_flat
Parameters: v0: test::ACopy, v1: test::ADrop
blk0 (root):
Statements:
  () <- test::use_a_copy(v0)
  () <- test::use_a_drop(v1)
  () <- test::use_a_copy(v0)
End:
  Return()

//! > ==========================================================================

//! > Cache Generated Impl 

//! > test_runner_name
test_cache_check

//! > function
fn foo() -> u32 {
    let x = |a| {
        a + 5
    };
    x(5)
}

//! > function_name
foo

//! > module_code

//! > semantic_diagnostics

//! > lowering_diagnostics

//! > lowering_flat
Parameters:
blk0 (root):
Statements:
  (v0: core::integer::u32) <- 10
  (v1: (core::integer::u32,)) <- struct_construct(v0)
  (v2: core::panics::PanicResult::<(core::integer::u32,)>) <- PanicResult::Ok(v1)
End:
  Return(v2)

//! > ==========================================================================

//! > Cache Impl Impl

//! > test_runner_name
test_cache_check

//! > function
fn foo() {
    bar::<MyOuter>();
}

fn bar<impl I: Outer>() {
    I::Impl::foo();
}

//! > function_name
foo

//! > module_code
trait Inner {
    fn foo();
}

trait Outer {
    impl Impl: Inner;
}

impl MyInner of Inner {
    fn foo() {}
}

impl MyOuter of Outer {}

//! > semantic_diagnostics

//! > lowering_diagnostics

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