From 2a760aa7cee00829fe7b1649cad1efa5ddf8e259 Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Mon, 3 Feb 2014 22:38:48 +0100 Subject: 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. --- src/dotty/tools/dotc/typer/Implicits.scala | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) (limited to 'src') diff --git a/src/dotty/tools/dotc/typer/Implicits.scala b/src/dotty/tools/dotc/typer/Implicits.scala index ddd37a885..b15b73fca 100644 --- a/src/dotty/tools/dotc/typer/Implicits.scala +++ b/src/dotty/tools/dotc/typer/Implicits.scala @@ -63,14 +63,9 @@ object Implicits { case tpw: TermRef => false // can't discard overloaded refs case tpw => - def isConforms(sym: Symbol) = - sym.exists && sym.owner == defn.ScalaPredefModule.moduleClass && sym.name == tpnme.Conforms - if (isConforms(tpw.typeSymbol)) false // todo: figure out why we need conforms - else { - //if (ctx.typer.isApplicable(tp, argType :: Nil, resultType)) - // println(i"??? $tp is applicable to $this / typeSymbol = ${tpw.typeSymbol}") - true - } + //if (ctx.typer.isApplicable(tp, argType :: Nil, resultType)) + // println(i"??? $tp is applicable to $this / typeSymbol = ${tpw.typeSymbol}") + true } def discardForValueType(tpw: Type): Boolean = tpw match { -- cgit v1.2.3