summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2012-10-05 22:19:52 -0700
committerPaul Phillips <paulp@improving.org>2012-10-06 11:43:44 -0700
commit883f1ac88dd7cec5882d42d6b48d7f267d1f6e00 (patch)
treeb62e752f44e04b163fb0eb45efa733cdb7bd7eac /src
parente47b45864118c16d260cac364d34dc0375c31fab (diff)
downloadscala-883f1ac88dd7cec5882d42d6b48d7f267d1f6e00.tar.gz
scala-883f1ac88dd7cec5882d42d6b48d7f267d1f6e00.tar.bz2
scala-883f1ac88dd7cec5882d42d6b48d7f267d1f6e00.zip
Responded to comment about how many isCoercibles there are.
I make the case that there is only one.
Diffstat (limited to 'src')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Infer.scala11
1 files changed, 11 insertions, 0 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
index 16e864bd41..64b0da15aa 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
@@ -410,8 +410,19 @@ trait Infer extends Checkable {
/** Like weakly compatible but don't apply any implicit conversions yet.
* Used when comparing the result type of a method with its prototype.
+ *
* [Martin] I think Infer is also created by Erasure, with the default
* implementation of isCoercible
+ * [Paulp] (Assuming the above must refer to my comment on isCoercible)
+ * Nope, I examined every occurrence of Inferencer in trunk. It
+ * appears twice as a self-type, once at its definition, and once
+ * where it is instantiated in Typers. There are no others.
+ *
+ % ack -A0 -B0 --no-filename '\bInferencer\b' src
+ self: Inferencer =>
+ self: Inferencer =>
+ class Inferencer(context: Context) extends InferencerContextErrors with InferCheckable {
+ val infer = new Inferencer(context0) {
*/
def isConservativelyCompatible(tp: Type, pt: Type): Boolean =
context.withImplicitsDisabled(isWeaklyCompatible(tp, pt))