-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Refine implicit priority change warnings
- Loading branch information
Showing
10 changed files
with
51 additions
and
30 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-- [E172] Type Error: tests/neg/given-triangle.scala:14:18 ------------------------------------------------------------- | ||
14 |@main def Test = f // error | ||
| ^ | ||
|Ambiguous given instances: both given instance given_B and given instance given_C match type A of parameter a of method f |
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
File renamed without changes.
File renamed without changes.
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 |
---|---|---|
@@ -0,0 +1,7 @@ | ||
//> using options -Werror | ||
trait Writes[T] | ||
trait Format[T] extends Writes[T] | ||
given [T: List]: Writes[T] = null | ||
given [T]: Format[T] = null | ||
|
||
val _ = summon[Writes[Int]] |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
//> using options -source 3.5 -Werror | ||
trait SameRuntime[A, B] | ||
trait BSONWriter[T] | ||
trait BSONHandler[T] extends BSONWriter[T] | ||
|
||
opaque type Id = String | ||
object Id: | ||
given SameRuntime[Id, String] = ??? | ||
|
||
given BSONHandler[String] = ??? | ||
given [T: BSONHandler]: BSONHandler[List[T]] = ??? | ||
|
||
given opaqueWriter[T, A](using rs: SameRuntime[T, A], writer: BSONWriter[A]): BSONWriter[T] = ??? | ||
|
||
val x = summon[BSONHandler[List[Id]]] // this doesn't emit warning | ||
val y = summon[BSONWriter[List[Id]]] // this did emit warning |
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,4 +1,4 @@ | ||
import language.future | ||
import language.`3.6` | ||
|
||
class A | ||
class B extends A | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.