Skip to content

Feature/Bug: Ensures clauses of bodiless functions should have reads checks #5822

Open
@MikaelMayer

Description

@MikaelMayer
trait A {
  var x: int
  function Test(): int
    ensures Test() == x
}

Is not giving any error, and it's impossible to implement such a trait. However, it might be extremely useful, especially in modeling situations when the trait isn't going to be implemented at all, to perform reads checks on the ensures clause.
Reads checks on ensures clauses aren't necessary when the function is provided with a body.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions