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 {
1147
1147
var allAlts = denot.alternatives
1148
1148
.map(denot => TermRef (receiver.tpe, denot.symbol))
1149
1149
.filter(tr => typeParamCount(tr) == targs.length)
1150
+ .filter { _.widen match {
1151
+ case MethodTpe (_, _, x : MethodType ) => ! x.isImplicitMethod
1152
+ case _ => true
1153
+ }}
1150
1154
if (targs.isEmpty) allAlts = allAlts.filterNot(_.widen.isInstanceOf [PolyType ])
1151
1155
val alternatives = ctx.typer.resolveOverloaded(allAlts, proto)
1152
1156
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