test(tests/lean/vm_let_expr): add regression test for bugs fixed in the previous two commits

This commit is contained in:
Leonardo de Moura 2017-01-12 08:50:45 -08:00
parent 1977b4ff3f
commit cdfa9e655c
2 changed files with 16 additions and 0 deletions

View file

@ -0,0 +1,11 @@
meta def mk_value (n : nat) : nat :=
trace "mk_value" (λ _, 2 * n)
meta def mk_fn (sz : nat) : nat → nat :=
let n := mk_value sz in
λ x, x + n
vm_eval let f := mk_fn 10 in f 1 + f 2 + f 3 + f 4
vm_eval ((let x := mk_value 10 in mk_fn x) 10)

View file

@ -0,0 +1,5 @@
mk_value
90
mk_value
mk_value
50