Closed ranjitjhala closed 6 months ago
Another example. The following code verifies because collect has type forall B: FromIterator. fn(Self) -> B
and we are generating an unconstrained kvar for B
#[flux::sig(fn(Vec<i32>) -> Vec<i32[0]>)]
pub fn test(x: Vec<i32>) -> Vec<i32> {
x.into_iter().collect()
}
This was fixed in https://github.com/flux-rs/flux/pull/623 and a test was added in https://github.com/flux-rs/flux/commit/3869e7f3263d922a46a2755305fd8a9885c80345
The code below currently verifies, but shouldn't (maybe we're generating fresh kvars for the
Self
at the call tox.foo
?)