Skip to content

Commit 80830e3

Browse files
committed
tweak test cases
1 parent abd085e commit 80830e3

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/neg-custom-args/boxmap.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ def test[A <: Top, B <: Top] =
1616
def lazymap[A <: Top, B <: Top](b: Box[A])(f: A => B) =
1717
() => b[Box[B]]((x: A) => box(f(x)))
1818
val x0: (b: Box[A]) -> (f: A => B) -> (() -> Box[B]) = lazymap[A, B] // error
19-
val x: (b: Box[A]) -> (f: A => B) -> {f} (() -> Box[B]) = lazymap[A, B] // error // limitation
19+
val x: (b: Box[A]) -> (f: A => B) -> {b, f} (() -> Box[B]) = lazymap[A, B] // works
2020
val y: (b: Box[A]) -> (f: A => B) -> {*} (() -> Box[B]) = lazymap[A, B] // works
2121
()

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ def map[A, B](ref: {*} LazyRef[A], f: A => B): {f, ref} LazyRef[B] =
99
new LazyRef(() => f(ref.elem()))
1010

1111
def mapc[A, B]: (ref: {*} LazyRef[A], f: A => B) => {f, ref} LazyRef[B] =
12-
(ref1, f1) => map[A, B](ref1, f1) // error // limitation
12+
(ref1, f1) => map[A, B](ref1, f1)
1313

1414
def test(cap1: Cap, cap2: Cap) =
1515
def f(x: Int) = if cap1 == cap1 then x else 0

0 commit comments

Comments
 (0)