You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In creusot_contracts, when implementing a trait that is specified with extern_spec!, the calls to the trait methods will ignore the spec of the implementation and fetch the spec of the trait instead.
// in user codeletmut empty = EmptyIt{};let x = empty.next();
Then in coma, next appears as:
let rec next'0 (self:borrowed ()) (return' (ret:t_Option'0))= any
[ return' (result:t_Option'0)-> {[%#siter1] match result with
| C_None'0 -> completed'0 self
| C_Some'0 v -> produces'0 self.current (Seq.singleton v) self.final
end}
(! return' {result}) ]
This is the spec of the trait, not the one we wrote on EmptyIt::next.
(Note that completed'0 and produces'0 are the correct ones, so it still works in this case)
The text was updated successfully, but these errors were encountered:
In
creusot_contracts
, when implementing a trait that is specified withextern_spec!
, the calls to the trait methods will ignore the spec of the implementation and fetch the spec of the trait instead.Example
Then in coma,
next
appears as:This is the spec of the trait, not the one we wrote on
EmptyIt::next
.(Note that
completed'0
andproduces'0
are the correct ones, so it still works in this case)The text was updated successfully, but these errors were encountered: