File tree Expand file tree Collapse file tree 3 files changed +16
-2
lines changed
compiler/src/dotty/tools/dotc/typer Expand file tree Collapse file tree 3 files changed +16
-2
lines changed Original file line number Diff line number Diff line change @@ -1389,8 +1389,7 @@ trait Applications extends Compatibility { self: Typer with Dynamic =>
13891389 }
13901390 }
13911391
1392- case pt @ PolyProto (targs1, pt1) =>
1393- assert(targs.isEmpty)
1392+ case pt @ PolyProto (targs1, pt1) if targs.isEmpty =>
13941393 val alts1 = alts filter pt.isMatchedBy
13951394 resolveOverloaded(alts1, pt1, targs1)
13961395
Original file line number Diff line number Diff line change 1+ object A {
2+ def a [F ](x : Int ) = 0
3+ def a [F ](x : String ) = 0
4+ }
5+ object Test extends App {
6+ A .a[String ][Int ](3 ) == 1 // error: ambiguous
7+ }
Original file line number Diff line number Diff line change 1+ class Apply { def apply [A ](x : Int ) = 1 }
2+ object A {
3+ def a [F ] = new Apply
4+ def a [F ](x : String ) = 0
5+ }
6+ object Test extends App {
7+ assert(A .a[String ][Int ](3 ) == 1 )
8+ }
You can’t perform that action at this time.
0 commit comments