Skip to content

Forloop returns- verification problem #475

@wmanshu

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.

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