Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

If-else clause with some code and then returns #463

Open
wmanshu opened this issue Aug 21, 2019 · 2 comments
Open

If-else clause with some code and then returns #463

wmanshu opened this issue Aug 21, 2019 · 2 comments
Assignees
Labels

Comments

@wmanshu
Copy link

wmanshu commented Aug 21, 2019

  @payable
  func placeBid(implicit value : inout Wei) -> Bool
  mutates (Wei.rawValue, highestBid, highestBidder)
  pre (value.rawValue > 0)
  pre (dictContains(pendingReturns, highestBidder) == true)
  post (returns(value.rawValue > highestBid.rawValue))

  {
    if value.rawValue <= highestBid.rawValue {
      return false
    } else {
    highestBid.transfer(source: &value)
    highestBidder = caller
    return true
  }
  }

The is-else problem before was fixed, however, it still cannot work in this case: If there are some other code before the return statement.

@mrRachar mrRachar added the bug label Aug 22, 2019
@mrRachar mrRachar self-assigned this Aug 22, 2019
@mrRachar
Copy link
Collaborator

Is this an issue with the Boogie verification or in solidity?

@wmanshu
Copy link
Author

wmanshu commented Aug 23, 2019

Is this an issue with the Boogie verification or in solidity?

It's with Boogie.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants