-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swap two givens in Specs2 to satisfy new restriuction
- Loading branch information
Showing
3 changed files
with
32 additions
and
30 deletions.
There are no files selected for viewing
Submodule specs2
updated
1 files
+6 −6 | matcher/shared/src/main/scala/org/specs2/matcher/describe/Diffable.scala |
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,25 +1,25 @@ | ||
-- [E007] Type Mismatch Error: tests/neg/i7294-a.scala:8:18 ------------------------------------------------------------ | ||
8 | case x: T => x.g(10) // error // error | ||
| ^^^^^^^ | ||
| Found: Any | ||
| Required: T | ||
| | ||
| where: T is a type in given instance f with bounds <: foo.Foo | ||
| | ||
| longer explanation available when compiling with `-explain` | ||
-- Error: tests/neg/i7294-a.scala:8:10 --------------------------------------------------------------------------------- | ||
8 | case x: T => x.g(10) // error // error | ||
| ^ | ||
| Result of implicit search for scala.reflect.TypeTest[Nothing, T] will change. | ||
| Current result foo.i7294-a$package.f will be no longer eligible | ||
| because it is not defined before the search position. | ||
| Result with new rules: No Matching Implicit. | ||
| To opt into the new rules, use the `experimental.givenLoopPrevention` language import. | ||
| | ||
| To fix the problem without the language import, you could try one of the following: | ||
| - use a `given ... with` clause as the enclosing given, | ||
| - rearrange definitions so that foo.i7294-a$package.f comes earlier, | ||
| - use an explicit argument. | ||
| This will be an error in Scala 3.5 and later. | ||
| | ||
| where: T is a type in given instance f with bounds <: foo.Foo | ||
-- [E007] Type Mismatch Error: tests/neg/i7294-a.scala:10:20 ----------------------------------------------------------- | ||
10 | case x: T => x.g(10) // error // error | ||
| ^^^^^^^ | ||
| Found: Any | ||
| Required: T | ||
| | ||
| where: T is a type in given instance f with bounds <: foo.Foo | ||
| | ||
| longer explanation available when compiling with `-explain` | ||
-- Error: tests/neg/i7294-a.scala:10:12 -------------------------------------------------------------------------------- | ||
10 | case x: T => x.g(10) // error // error | ||
| ^ | ||
| Result of implicit search for scala.reflect.TypeTest[Nothing, T] will change. | ||
| Current result foo.Test.f will be no longer eligible | ||
| because it is not defined before the search position. | ||
| Result with new rules: No Matching Implicit. | ||
| To opt into the new rules, use the `experimental.givenLoopPrevention` language import. | ||
| | ||
| To fix the problem without the language import, you could try one of the following: | ||
| - use a `given ... with` clause as the enclosing given, | ||
| - rearrange definitions so that foo.Test.f comes earlier, | ||
| - use an explicit argument. | ||
| This will be an error in Scala 3.5 and later. | ||
| | ||
| where: T is a type in given instance f with bounds <: foo.Foo |
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