Closed ranjitjhala closed 1 week ago
Specifically I think this would be unsoundly accepted
#![allow(dead_code)]
fn foo(f: fn(i32) -> i32) -> i32 {
f(10)
}
#[flux::sig(fn (bool[true]))]
fn assert(_b:bool){}
#[flux::sig(fn (i32{v: v > 100}) -> i32)]
fn inc(x: i32) -> i32 {
assert(x > 100);
x + 1
}
fn baz() -> i32 {
foo(inc)
}
Also, I think for closures this means we never check the closure's body.
_Originally posted by @nilehmann in https://github.com/flux-rs/flux/pull/854#discussion_r1806877393_