Skip to content
Snippets Groups Projects
Commit f78d0120 authored by Regis Blanc's avatar Regis Blanc
Browse files

extra test

parent 4c479f35
Branches
Tags
No related merge requests found
object NestedFunState6 {
def simpleSideEffect(n: BigInt): BigInt = {
require(n > 0)
var a = BigInt(0)
def incA(prevA: BigInt): Unit = {
require(prevA == a)
a += 1
} ensuring(_ => a == prevA + 1)
incA(a)
incA(a)
incA(a)
incA(a)
a
} ensuring(_ == 4)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment