File tree 2 files changed +51
-0
lines changed 2 files changed +51
-0
lines changed Original file line number Diff line number Diff line change
1
+ -- [E172] Type Error: tests/neg/i8827.scala:22:26 ----------------------------------------------------------------------
2
+ 22 | summon[Order[List[Foo]]] // error
3
+ | ^
4
+ | No given instance of type pkg.Order[List[pkg.Foo]] was found for parameter x of method summon in object Predef.
5
+ | I found:
6
+ |
7
+ | pkg.Order.orderList[pkg.Foo](/* missing */summon[pkg.Order[pkg.Foo]])
8
+ |
9
+ | But no implicit values were found that match type pkg.Order[pkg.Foo].
10
+ |
11
+ | One of the following imports might fix the problem:
12
+ |
13
+ | import pkg.Implicits.orderFoo
14
+ | import pkg.Givens.orderFoo
15
+ -- [E172] Type Error: tests/neg/i8827.scala:23:28 ----------------------------------------------------------------------
16
+ 23 | summon[Order[Option[Foo]]] // error
17
+ | ^
18
+ |No given instance of type pkg.Order[Option[pkg.Foo]] was found for parameter x of method summon in object Predef.
19
+ |I found:
20
+ |
21
+ | pkg.Order.given_Order_Option[pkg.Foo](/* missing */summon[pkg.Order[pkg.Foo]])
22
+ |
23
+ |But no implicit values were found that match type pkg.Order[pkg.Foo].
24
+ |
25
+ |One of the following imports might fix the problem:
26
+ |
27
+ | import pkg.Implicits.orderFoo
28
+ | import pkg.Givens.orderFoo
Original file line number Diff line number Diff line change
1
+ package pkg
2
+
3
+ trait Order [A ]
4
+
5
+ object Order {
6
+ implicit def orderList [A ](implicit orderA : Order [A ]): Order [List [A ]] = ???
7
+
8
+ given [A ](using orderA : Order [A ]): Order [Option [A ]] = ???
9
+ }
10
+
11
+ class Foo
12
+
13
+ object Implicits {
14
+ implicit def orderFoo : Order [Foo ] = ???
15
+ }
16
+
17
+ object Givens {
18
+ given orderFoo : Order [Foo ] = ???
19
+ }
20
+
21
+ @ main def main : Unit =
22
+ summon[Order [List [Foo ]]] // error
23
+ summon[Order [Option [Foo ]]] // error
You can’t perform that action at this time.
0 commit comments