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

testing aliasing to captured variables

parent 838415e7
No related branches found
No related tags found
No related merge requests found
import leon.lang._
object NestedFunctinAliasing1 {
def f(): Int = {
val a = Array(1,2,3,4)
def g(b: Array[Int]): Unit = {
require(b.length > 0 && a.length > 0)
b(0) = 10
a(0) = 17
} ensuring(_ => b(0) == 10)
g(a)
a(0)
} ensuring(_ == 10)
}
import leon.lang._
object NestedFunctinAliasing1 {
def f(a: Array(1,2,3,4)): Int = {
def g(b: Array[Int]): Unit = {
require(b.length > 0 && a.length > 0)
b(0) = 10
a(0) = 17
} ensuring(_ => b(0) == 10)
g(a)
a(0)
} ensuring(_ == 10)
}
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment