File tree Expand file tree Collapse file tree 2 files changed +14
-11
lines changed
tests/neg-custom-args/captures Expand file tree Collapse file tree 2 files changed +14
-11
lines changed Original file line number Diff line number Diff line change 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 ?
Original file line number Diff line number Diff line change @@ -2,6 +2,9 @@ import language.experimental.captureChecking
22import caps .Capability
33import caps .use
44
5+ trait List [+ T ]:
6+ def map [U ](f : T => U ): List [U ]
7+
58trait File extends Capability
69class Logger (f : File ^ ) extends Capability // <- will work if we remove the extends clause
710
You can’t perform that action at this time.
0 commit comments