Skip to content

Commit 70df81d

Browse files
authored
Update a test related to scala2-library-cc-tasty (#22053)
[test_scala2_library_tasty]
2 parents a582b27 + ae00703 commit 70df81d

File tree

2 files changed

+14
-11
lines changed

2 files changed

+14
-11
lines changed

tests/neg-custom-args/captures/i21614.check

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,15 @@
1-
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/i21614.scala:9:33 ----------------------------------------
2-
9 | files.map((f: F) => new Logger(f)) // error, Q: can we make this pass (see #19076)?
3-
| ^
4-
| Found: (f : F^)
5-
| Required: File^
6-
|
7-
| longer explanation available when compiling with `-explain`
8-
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/i21614.scala:12:12 ---------------------------------------
9-
12 | files.map(new Logger(_)) // error, Q: can we improve the error message?
1+
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/i21614.scala:12:33 ---------------------------------------
2+
12 | files.map((f: F) => new Logger(f)) // error, Q: can we make this pass (see #19076)?
3+
| ^
4+
| Found: (f : F^)
5+
| Required: File^
6+
|
7+
| longer explanation available when compiling with `-explain`
8+
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/i21614.scala:15:12 ---------------------------------------
9+
15 | files.map(new Logger(_)) // error, Q: can we improve the error message?
1010
| ^^^^^^^^^^^^^
11-
| Found: (_$1: box File^{files*}) ->{files*} (ex$13: caps.Exists) -> box Logger{val f: File^{_$1}}^{ex$13}
12-
| Required: (_$1: box File^{files*}) -><fluid> box Logger{val f: File^?}^?
11+
| Found: (_$1: box File^{files*}) ->{files*} (ex$16: caps.Exists) -> box Logger{val f: File^{_$1}}^{ex$16}
12+
| Required: (_$1: box File^{files*}) => box Logger{val f: File^?}^?
1313
|
1414
| Note that the universal capability `cap`
1515
| cannot be included in capture set ?

tests/neg-custom-args/captures/i21614.scala

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,9 @@ import language.experimental.captureChecking
22
import caps.Capability
33
import caps.use
44

5+
trait List[+T]:
6+
def map[U](f: T => U): List[U]
7+
58
trait File extends Capability
69
class Logger(f: File^) extends Capability // <- will work if we remove the extends clause
710

0 commit comments

Comments
 (0)