Skip to content

Update a test related to scala2-library-cc-tasty #22053

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Nov 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions tests/neg-custom-args/captures/i21614.check
Original file line number Diff line number Diff line change
@@ -1,15 +1,15 @@
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/i21614.scala:9:33 ----------------------------------------
9 | files.map((f: F) => new Logger(f)) // error, Q: can we make this pass (see #19076)?
| ^
| Found: (f : F^)
| Required: File^
|
| longer explanation available when compiling with `-explain`
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/i21614.scala:12:12 ---------------------------------------
12 | files.map(new Logger(_)) // error, Q: can we improve the error message?
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/i21614.scala:12:33 ---------------------------------------
12 | files.map((f: F) => new Logger(f)) // error, Q: can we make this pass (see #19076)?
| ^
| Found: (f : F^)
| Required: File^
|
| longer explanation available when compiling with `-explain`
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/i21614.scala:15:12 ---------------------------------------
15 | files.map(new Logger(_)) // error, Q: can we improve the error message?
| ^^^^^^^^^^^^^
| Found: (_$1: box File^{files*}) ->{files*} (ex$13: caps.Exists) -> box Logger{val f: File^{_$1}}^{ex$13}
| Required: (_$1: box File^{files*}) -><fluid> box Logger{val f: File^?}^?
| Found: (_$1: box File^{files*}) ->{files*} (ex$16: caps.Exists) -> box Logger{val f: File^{_$1}}^{ex$16}
| Required: (_$1: box File^{files*}) => box Logger{val f: File^?}^?
|
| Note that the universal capability `cap`
| cannot be included in capture set ?
Expand Down
3 changes: 3 additions & 0 deletions tests/neg-custom-args/captures/i21614.scala
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,9 @@ import language.experimental.captureChecking
import caps.Capability
import caps.use

trait List[+T]:
def map[U](f: T => U): List[U]

trait File extends Capability
class Logger(f: File^) extends Capability // <- will work if we remove the extends clause

Expand Down
Loading