Open cpitclaudel opened 2 years ago
Dafny accepts this:
predicate P<T>(t: T, ts: seq<T>) requires t in ts
… but not this:
method M<T>(ts: seq<T>) { var f := t requires t in ts => false; // Error: in can only be applied to expressions of sequence types that support equality (got seq<T>) }
Is there a reason for this inconsistency?
Looks like a plain bug, since this is accepted instead:
method M<T>(ts: seq<T>) { ghost var pre := t => t in ts; var f := t requires pre(t) => false; }
Dafny accepts this:
… but not this:
Is there a reason for this inconsistency?