File tree Expand file tree Collapse file tree 2 files changed +18
-0
lines changed
compiler/src/dotty/tools/dotc/ast Expand file tree Collapse file tree 2 files changed +18
-0
lines changed Original file line number Diff line number Diff line change @@ -1147,6 +1147,10 @@ object tpd extends Trees.Instance[Type] with TypedTreeInfo {
11471147 var allAlts = denot.alternatives
11481148 .map(denot => TermRef (receiver.tpe, denot.symbol))
11491149 .filter(tr => typeParamCount(tr) == targs.length)
1150+ .filter { _.widen match {
1151+ case MethodTpe (_, _, x : MethodType ) => ! x.isImplicitMethod
1152+ case _ => true
1153+ }}
11501154 if (targs.isEmpty) allAlts = allAlts.filterNot(_.widen.isInstanceOf [PolyType ])
11511155 val alternatives = ctx.typer.resolveOverloaded(allAlts, proto)
11521156 assert(alternatives.size == 1 ,
Original file line number Diff line number Diff line change 1+ trait Bar
2+ trait Foo {
3+ def == (that : Foo )(implicit b : Bar ): Boolean = ???
4+ }
5+
6+ case class FooCC (f : Foo )
7+
8+ object Test {
9+ def main (args : Array [String ]): Unit = {
10+ val foo1, foo2 = new Foo {}
11+ assert(FooCC (foo1) == FooCC (foo1))
12+ assert(FooCC (foo1) != FooCC (foo2))
13+ }
14+ }
You can’t perform that action at this time.
0 commit comments