flux icon indicating copy to clipboard operation
flux copied to clipboard

Lost index using `const` ?

Open ranjitjhala opened this issue 10 months ago • 0 comments

The second call to foo fails to verify. Looking at the mir the location's value is defined using a const _ so perhaps something is lost there?

#[flux::sig(fn(&i32[5]))]
fn foo(_z: &i32) {}

pub fn bar() {
    let x = 5;
    foo(&x);
    foo(&5);
}

https://flux.programming.systems/?code=41KOTssprbCyKs5M10jL01DLNDaKNo3V1IzlSstTSMvP16iyUgAJaipU13JxFZQmKQDFkxKLNIACXApAkJNaolChYKtgag3mgrSoVWgicUyBnFoA

ranjitjhala avatar Oct 19 '23 03:10 ranjitjhala