|
17 | 17 | |
|
18 | 18 | | import math.Numeric.Implicits.infixNumericOps
|
19 | 19 | |
|
20 |
| --- Error: tests/neg/missing-implicit.scala:10:24 ----------------------------------------------------------------------- |
21 |
| -10 |val f = Future[Unit] { } // error |
22 |
| - | ^ |
23 |
| - | Cannot find an implicit ExecutionContext. You might pass |
24 |
| - | an (implicit ec: ExecutionContext) parameter to your method. |
25 |
| - | |
26 |
| - | The ExecutionContext is used to configure how and on which |
27 |
| - | thread pools Futures will run, so the specific ExecutionContext |
28 |
| - | that is selected is important. |
29 |
| - | |
30 |
| - | If your application does not define an ExecutionContext elsewhere, |
31 |
| - | consider using Scala's global ExecutionContext by defining |
32 |
| - | the following: |
33 |
| - | |
34 |
| - | implicit val ec: scala.concurrent.ExecutionContext = scala.concurrent.ExecutionContext.global |
35 |
| - | |
36 |
| - | The following import might fix the problem: |
37 |
| - | |
38 |
| - | import concurrent.ExecutionContext.Implicits.global |
39 |
| - | |
40 |
| --- [E007] Type Mismatch Error: tests/neg/missing-implicit.scala:12:25 -------------------------------------------------- |
41 |
| -12 |val b: java.lang.Byte = (1: Byte) // error, but no hint |
42 |
| - | ^^^^^^^ |
43 |
| - | Found: Byte |
44 |
| - | Required: Byte² |
45 |
| - | |
46 |
| - | where: Byte is a class in package scala |
47 |
| - | Byte² is a class in package java.lang |
48 |
| --- [E007] Type Mismatch Error: tests/neg/missing-implicit.scala:16:44 -------------------------------------------------- |
49 |
| -16 |val d: scala.concurrent.duration.Duration = (10, DAYS) // error |
50 |
| - | ^^^^^^^^^^ |
51 |
| - | Found: (Int, java.util.concurrent.TimeUnit) |
52 |
| - | Required: concurrent².duration.Duration |
53 |
| - | |
54 |
| - | where: concurrent is a package in package java.util |
55 |
| - | concurrent² is a package in package scala |
56 |
| - | |
57 |
| - | |
58 |
| - | The following import might fix the problem: |
59 |
| - | |
60 |
| - | import concurrent.duration.pairIntToDuration |
61 |
| - | |
62 |
| --- [E008] Not Found Error: tests/neg/missing-implicit.scala:18:48 ------------------------------------------------------ |
63 |
| -18 |val d2: scala.concurrent.duration.Duration = 10.days // error |
64 |
| - | ^^^^^^^ |
65 |
| - | value days is not a member of Int, but could be made available as an extension method. |
66 |
| - | |
67 |
| - | One of the following imports might fix the problem: |
68 |
| - | |
69 |
| - | import concurrent.duration.DurationInt |
70 |
| - | import concurrent.duration.DurationLong |
71 |
| - | import concurrent.duration.DurationDouble |
72 |
| - | |
0 commit comments