-
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.
Handle default implicits to context parameters under -3.4-migration (#…
…19512) Synthesized calls for default implicits need a using clause when the method is an implicit method with a context bound parameter, but only in in 3.4-migration. Before this PR we still generated a normal empty parameter list. Also, we can't rewrite adding a `using` clause if the argument list is empty, since we are lacking precise position info. Fixes #19506
- Loading branch information
Showing
4 changed files
with
17 additions
and
4 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
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 @@ | ||
//> using options "-source:3.4-migration", | ||
|
||
trait Reader[T] | ||
def read[T: Reader](s: String, trace: Boolean = false): T = ??? | ||
|
||
def Test = | ||
read[Object]("") // error | ||
read[Object]("")() // error |