forked from scala/scala3
-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
20 changed files
with
323 additions
and
120 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,7 @@ | ||
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/class-contra.scala:12:39 --------------------------------- | ||
12 | def fun(x: K{val f: T^{a}}) = x.setf(a) // error | ||
| ^ | ||
| Found: (a : T^{x, y}) | ||
| Required: T^{} | ||
| | ||
| Note that a capability (K.this.f : T^) in a capture set appearing in contravariant position | ||
| was mapped to (x.f : T^{a}) which is not a capability. Therefore, it was under-approximated to the empty set. | ||
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/class-contra.scala:12:40 --------------------------------- | ||
12 | def fun1(k: K{val f: T^{a}}) = k.setf(a) // error | ||
| ^ | ||
| Found: (a : T^{x, y}) | ||
| Required: T^{k.f} | ||
| | ||
| longer explanation available when compiling with `-explain` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,20 +1,14 @@ | ||
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/explain-under-approx.scala:12:10 ------------------------- | ||
12 | col.add(Future(() => 25)) // error | ||
| ^^^^^^^^^^^^^^^^ | ||
| Found: Future[Int]{val a: (async : Async^)}^{async} | ||
| Required: Future[Int]^{} | ||
| | ||
| Note that a capability Collector.this.futs* in a capture set appearing in contravariant position | ||
| was mapped to col.futs* which is not a capability. Therefore, it was under-approximated to the empty set. | ||
| Found: Future[Int]{val a: (async : Async^)}^{async} | ||
| Required: Future[Int]^{col.futs*} | ||
| | ||
| longer explanation available when compiling with `-explain` | ||
-- [E007] Type Mismatch Error: tests/neg-custom-args/captures/explain-under-approx.scala:15:11 ------------------------- | ||
15 | col1.add(Future(() => 25)) // error | ||
| ^^^^^^^^^^^^^^^^ | ||
| Found: Future[Int]{val a: (async : Async^)}^{async} | ||
| Required: Future[Int]^{} | ||
| | ||
| Note that a capability Collector.this.futs* in a capture set appearing in contravariant position | ||
| was mapped to col1.futs* which is not a capability. Therefore, it was under-approximated to the empty set. | ||
| Found: Future[Int]{val a: (async : Async^)}^{async} | ||
| Required: Future[Int]^{col1.futs*} | ||
| | ||
| longer explanation available when compiling with `-explain` |
Oops, something went wrong.