flux icon indicating copy to clipboard operation
flux copied to clipboard

Check that `impl` satisfies `trait` specs

Open ranjitjhala opened this issue 6 months ago • 1 comments

Currently, flux happily verifies the below which seems dubious:

pub trait Silly {
    #[flux::sig(fn(&Self) -> i32{v:100 < v})]
    fn bloop(&self) -> i32;
}

impl Silly for i32 {
    fn bloop(&self) -> i32 {
        0
    }
}

Originally posted by @ranjitjhala in https://github.com/flux-rs/flux/pull/589#discussion_r1442110777

ranjitjhala avatar Jan 04 '24 18:01 ranjitjhala