Skip to content

Commit 25daaa8

Browse files
committed
fix boxmap test
The result should capture {f}, since the expression `box(f(x))` should be translated as: let z = f(x) in let y = □ z in box(y) Denoting the above term as `t`, we can see that `f ∈ cv(t)`.
1 parent f77436b commit 25daaa8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/pos-custom-args/captures/boxmap.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def box[T <: Top](x: T): Box[T] =
99
def map[A <: Top, B <: Top](b: Box[A])(f: A => B): Box[B] =
1010
b[Box[B]]((x: A) => box(f(x)))
1111

12-
def lazymap[A <: Top, B <: Top](b: Box[A])(f: A => B): (() -> Box[B]) =
12+
def lazymap[A <: Top, B <: Top](b: Box[A])(f: A => B): {f} (() -> Box[B]) =
1313
() => b[Box[B]]((x: A) => box(f(x)))
1414

1515
def test[A <: Top, B <: Top] =

0 commit comments

Comments
 (0)