blob: 2c4de65e764f5dd167cc580d681e7ca0dbdb6f52 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
# If a closure closes over a variable that is statically known *and*
# available dynamically through `with`, the statically known one must
# have precedence.
let
# introduce statically known `a` (this should be the result)
a = 1;
in
# introduce some closure depth to force both kinds of upvalue
# resolution, and introduce a dynamically known `a` within the
# closures
let f = b: with { a = 2; }; c: a + b + c;
in f 0 0
|