-
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.
Merge pull request #9167 from dotty-staging/fix-#9160
Have a per-run time budget for import suggestions
- Loading branch information
Showing
10 changed files
with
228 additions
and
70 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
Large diffs are not rendered by default.
Oops, something went wrong.
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,28 @@ | ||
-- Error: tests/neg/missing-implicit-2.scala:4:24 ---------------------------------------------------------------------- | ||
4 |val f = Future[Unit] { } // error | ||
| ^ | ||
| Cannot find an implicit ExecutionContext. You might pass | ||
| an (implicit ec: ExecutionContext) parameter to your method. | ||
| | ||
| The ExecutionContext is used to configure how and on which | ||
| thread pools Futures will run, so the specific ExecutionContext | ||
| that is selected is important. | ||
| | ||
| If your application does not define an ExecutionContext elsewhere, | ||
| consider using Scala's global ExecutionContext by defining | ||
| the following: | ||
| | ||
| implicit val ec: scala.concurrent.ExecutionContext = scala.concurrent.ExecutionContext.global | ||
| | ||
| The following import might fix the problem: | ||
| | ||
| import concurrent.ExecutionContext.Implicits.global | ||
| | ||
-- [E007] Type Mismatch Error: tests/neg/missing-implicit-2.scala:6:25 ------------------------------------------------- | ||
6 |val b: java.lang.Byte = (1: Byte) // error, but no hint | ||
| ^^^^^^^ | ||
| Found: Byte | ||
| Required: Byte² | ||
| | ||
| where: Byte is a class in package scala | ||
| Byte² is a class in package java.lang |
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,6 @@ | ||
import Predef.{byte2Byte => _, _} | ||
import scala.concurrent.Future | ||
|
||
val f = Future[Unit] { } // error | ||
|
||
val b: java.lang.Byte = (1: Byte) // error, but no hint |
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,25 @@ | ||
-- [E007] Type Mismatch Error: tests/neg/missing-implicit-3.scala:6:44 ------------------------------------------------- | ||
6 |val d: scala.concurrent.duration.Duration = (10, DAYS) // error | ||
| ^^^^^^^^^^ | ||
| Found: (Int, java.util.concurrent.TimeUnit) | ||
| Required: concurrent².duration.Duration | ||
| | ||
| where: concurrent is a package in package java.util | ||
| concurrent² is a package in package scala | ||
| | ||
| | ||
| The following import might fix the problem: | ||
| | ||
| import concurrent.duration.pairIntToDuration | ||
| | ||
-- [E008] Not Found Error: tests/neg/missing-implicit-3.scala:8:48 ----------------------------------------------------- | ||
8 |val d2: scala.concurrent.duration.Duration = 10.days // error | ||
| ^^^^^^^ | ||
| value days is not a member of Int, but could be made available as an extension method. | ||
| | ||
| One of the following imports might fix the problem: | ||
| | ||
| import concurrent.duration.DurationInt | ||
| import concurrent.duration.DurationLong | ||
| import concurrent.duration.DurationDouble | ||
| |
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,8 @@ | ||
import Predef.{byte2Byte => _, _} | ||
import math.Numeric | ||
|
||
val DAYS = scala.concurrent.duration.DAYS | ||
|
||
val d: scala.concurrent.duration.Duration = (10, DAYS) // error | ||
|
||
val d2: scala.concurrent.duration.Duration = 10.days // error |
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