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 #13884 from dotty-staging/fix-13842
Try to instantiate type variables in tryInsertImplicitOnQualifier
- Loading branch information
Showing
4 changed files
with
53 additions
and
16 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,14 @@ | ||
class Parent { class E } | ||
|
||
object ChildA extends Parent | ||
|
||
object ChildB extends Parent | ||
|
||
class Printer[C <: Parent](val child: C): | ||
def print22(e: child.E): String = "" | ||
|
||
def test = | ||
Printer(ChildA).print22(new ChildA.E) // does not work | ||
|
||
//Printer[ChildA.type](ChildA).print22(new ChildA.E) // works | ||
//val p = Printer(ChildA); p.print22(new ChildA.E) // works |