flux icon indicating copy to clipboard operation
flux copied to clipboard

Allow `external` signatures

Open ranjitjhala opened this issue 1 year ago • 1 comments

Sooner rather than later we will want to allow "assuming" types for functions from other crates /stdlib that are not part of flux. For example, we want to allow some refined signature for arr.len() that lets us check the code.

pub fn bar(arr: &[i32]) -> i32 {
    let n = arr.len();
    if 0 < n {
        arr[0]
    } else {
        0
    }
}

ranjitjhala avatar Dec 17 '22 19:12 ranjitjhala