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 #14219 from dotty-staging/fix-14214
Re-type implicit candidate if expected type is context function
- Loading branch information
Showing
3 changed files
with
24 additions
and
3 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
class Dummy | ||
given Dummy = ??? | ||
trait Foo | ||
given foo: Foo = ??? | ||
trait Bar | ||
given bar(using Dummy): Bar = ??? | ||
|
||
object Test: | ||
summon[Dummy ?=> Foo] // was error | ||
summon[Dummy ?=> Foo](using foo) // works | ||
summon[Dummy ?=> Foo](using (_: Dummy) ?=> foo) // works | ||
summon[Dummy ?=> Bar] | ||
summon[Dummy ?=> Bar](using bar) // works | ||
summon[Dummy ?=> Bar](using (_: Dummy) ?=> bar) // works | ||
|
||
|