diff options
author | Martin Odersky <odersky@gmail.com> | 2014-02-03 22:38:48 +0100 |
---|---|---|
committer | Martin Odersky <odersky@gmail.com> | 2014-02-03 22:38:48 +0100 |
commit | 2a760aa7cee00829fe7b1649cad1efa5ddf8e259 (patch) | |
tree | a368fc3a5b61b03d520188af0cb6cb82ffe22491 /src | |
parent | 3aa2eb08cb9b4b3d6df35fc6e2e39787111067a1 (diff) | |
download | dotty-2a760aa7cee00829fe7b1649cad1efa5ddf8e259.tar.gz dotty-2a760aa7cee00829fe7b1649cad1efa5ddf8e259.tar.bz2 dotty-2a760aa7cee00829fe7b1649cad1efa5ddf8e259.zip |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/dotty/tools/dotc/typer/Implicits.scala | 11 |
1 files changed, 3 insertions, 8 deletions
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 { |