Skip to content

Commit 2a760aa

Browse files
committed
Dropping eligibility of conforms as an implicit conversion.
"conforms" is no longer special-cased to be eligible as a implicit conversion. Only implicit methods are eligible, whereas conforms is an implicit value with an apply method. So far, "conforms" as an implicit conversion masked in effect some type inference bugs. With the previous two commits, it is no longer necessary because two type inference bugs got fixed.
1 parent 3aa2eb0 commit 2a760aa

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

src/dotty/tools/dotc/typer/Implicits.scala

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -63,14 +63,9 @@ object Implicits {
6363
case tpw: TermRef =>
6464
false // can't discard overloaded refs
6565
case tpw =>
66-
def isConforms(sym: Symbol) =
67-
sym.exists && sym.owner == defn.ScalaPredefModule.moduleClass && sym.name == tpnme.Conforms
68-
if (isConforms(tpw.typeSymbol)) false // todo: figure out why we need conforms
69-
else {
70-
//if (ctx.typer.isApplicable(tp, argType :: Nil, resultType))
71-
// println(i"??? $tp is applicable to $this / typeSymbol = ${tpw.typeSymbol}")
72-
true
73-
}
66+
//if (ctx.typer.isApplicable(tp, argType :: Nil, resultType))
67+
// println(i"??? $tp is applicable to $this / typeSymbol = ${tpw.typeSymbol}")
68+
true
7469
}
7570

7671
def discardForValueType(tpw: Type): Boolean = tpw match {

0 commit comments

Comments
 (0)