summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorAdriaan Moors <adriaan.moors@typesafe.com>2014-02-10 13:58:24 -0800
committerAdriaan Moors <adriaan.moors@typesafe.com>2014-02-10 13:58:24 -0800
commit59fc37ade773f66eb05c7b2cfebe03abaf767c51 (patch)
tree52bf6e9c9bec2bc39f51c2696340ad7e434c3aee /src/compiler
parentc611f7b91414831e4de86e07c6310865b075b98d (diff)
parent127a7679c105ed1ff18350978d3ddf81a5dd07fa (diff)
downloadscala-59fc37ade773f66eb05c7b2cfebe03abaf767c51.tar.gz
scala-59fc37ade773f66eb05c7b2cfebe03abaf767c51.tar.bz2
scala-59fc37ade773f66eb05c7b2cfebe03abaf767c51.zip
Merge pull request #3497 from adriaanm/rebase-3464
Make Object#== override Any#==
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Infer.scala3
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Typers.scala3
2 files changed, 4 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Infer.scala b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
index 997fd6fc65..2d6c94349b 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Infer.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Infer.scala
@@ -174,7 +174,8 @@ trait Infer extends Checkable {
private lazy val stdErrorValue = stdErrorClass.newErrorValue(nme.ERROR)
/** The context-dependent inferencer part */
- class Inferencer(context: Context) extends InferencerContextErrors with InferCheckable {
+ abstract class Inferencer extends InferencerContextErrors with InferCheckable {
+ def context: Context
import InferErrorGen._
/* -- Error Messages --------------------------------------------------- */
diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
index edec831594..088aa5216a 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala
@@ -109,7 +109,8 @@ trait Typers extends Adaptations with Tags with TypersTracking with PatternTyper
private val transformed: mutable.Map[Tree, Tree] = unit.transformed
- val infer = new Inferencer(context0) {
+ val infer = new Inferencer {
+ def context = Typer.this.context
// See SI-3281 re undoLog
override def isCoercible(tp: Type, pt: Type) = undoLog undo viewExists(tp, pt)
}