Closed ranjitjhala closed 8 months ago
Updates the Generics type to include Self as base for trait, so the following now works:
Generics
Self as base
trait
#[flux::generics(Self as base)] pub trait MyTrait { #[flux::sig(fn<refine p: Self -> bool>(&Self{v: p(v)}) -> Self{v: p(v)})] fn foo(&self) -> Self; } #[flux::sig(fn<T as base, refine q: T -> bool> (&T{v:q(v)}) -> T{v: q(v)})] pub fn bar<T: MyTrait>(x: &T) -> T { x.foo() }
@nilehmann I think I've addressed the issues would be good to take a look
I'm going to merge this myself because I have some big changes that are going to conflict.
thanks!
Updates the
Generics
type to includeSelf as base
fortrait
, so the following now works: