Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow external signatures #253

Open
ranjitjhala opened this issue Dec 17, 2022 · 1 comment
Open

Allow external signatures #253

ranjitjhala opened this issue Dec 17, 2022 · 1 comment

Comments

@ranjitjhala
Copy link
Contributor

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
Copy link
Contributor Author

Or we can just let copilot generate that code for us :-)

otoh

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant