summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala
diff options
context:
space:
mode:
authorVlad Ureche <vlad.ureche@gmail.com>2013-06-12 14:48:30 +0200
committerVlad Ureche <vlad.ureche@gmail.com>2013-06-12 14:55:37 +0200
commitc0ba5eb196cc3c7174c9278dd4d050513e55b4ce (patch)
tree1a3a959d27373c7162da722c240d2868afb549f5 /src/compiler/scala/tools/nsc/typechecker/Duplicators.scala
parenta54d86b5508630a4815ca7f6ca3d5f05b74b1d9f (diff)
downloadscala-c0ba5eb196cc3c7174c9278dd4d050513e55b4ce.tar.gz
scala-c0ba5eb196cc3c7174c9278dd4d050513e55b4ce.tar.bz2
scala-c0ba5eb196cc3c7174c9278dd4d050513e55b4ce.zip
Removed redundant `retypedMethod` in `Duplicators`
It was never used since its introduction in 3ee6b3653 by @dragos. Review by @dragos or @axel22 or @paulp.
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Duplicators.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Duplicators.scala20
1 files changed, 2 insertions, 18 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala b/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala
index f6142a81be..2b18a0eba7 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Duplicators.scala
@@ -42,9 +42,6 @@ abstract class Duplicators extends Analyzer {
protected def newBodyDuplicator(context: Context) = new BodyDuplicator(context)
- def retypedMethod(context: Context, tree: Tree, oldThis: Symbol, newThis: Symbol): Tree =
- (newBodyDuplicator(context)).retypedMethod(tree.asInstanceOf[DefDef], oldThis, newThis)
-
/** Return the special typer for duplicate method bodies. */
override def newTyper(context: Context): Typer =
newBodyDuplicator(context)
@@ -186,20 +183,6 @@ abstract class Duplicators extends Analyzer {
stats.foreach(invalidate(_, owner))
}
- def retypedMethod(ddef: DefDef, oldThis: Symbol, newThis: Symbol): Tree = {
- oldClassOwner = oldThis
- newClassOwner = newThis
- invalidateAll(ddef.tparams)
- mforeach(ddef.vparamss) { vdef =>
- invalidate(vdef)
- vdef.tpe = null
- }
- ddef.symbol = NoSymbol
- enterSym(context, ddef)
- debuglog("remapping this of " + oldClassOwner + " to " + newClassOwner)
- typed(ddef)
- }
-
private def inspectTpe(tpe: Type) = {
tpe match {
case MethodType(_, res) =>
@@ -401,7 +384,8 @@ abstract class Duplicators extends Analyzer {
tree.symbol = NoSymbol // maybe we can find a more specific member in a subclass of Any (see AnyVal members, like ==)
}
val ntree = castType(tree, pt)
- super.typed(ntree, mode, pt)
+ val res = super.typed(ntree, mode, pt)
+ res
}
}