Skip to content

Forloop returns- verification problem #475

Description

@wmanshu
contract A {
  var arr1: [Int] = []
}

A :: (any) {
  public init() {}

  func joinedAlready(participant: Int) -> Bool
  post (returns (exists (i, Int, arr1[i] == participant)))
  {
    for var i: Int in arr1 {
      if i == participant {
        return true
      }
    }
    return false
  }
}

cannot verify the post conditions.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions