summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/reflect/ToolBoxFactory.scala
diff options
context:
space:
mode:
authorPaul Phillips <paulp@improving.org>2013-09-27 12:28:55 -0700
committerPaul Phillips <paulp@improving.org>2013-10-02 08:59:55 -0700
commitaced32d05c97651534f468bc9a475ea5f6ae75b8 (patch)
treefda8b628ae8501a8df945aeb7f558f259c857e62 /src/compiler/scala/tools/reflect/ToolBoxFactory.scala
parent45183d8d28ff082d9186018b707f9fecb466f14f (diff)
downloadscala-aced32d05c97651534f468bc9a475ea5f6ae75b8.tar.gz
scala-aced32d05c97651534f468bc9a475ea5f6ae75b8.tar.bz2
scala-aced32d05c97651534f468bc9a475ea5f6ae75b8.zip
Removing unused code.
Most of this was revealed via -Xlint with a flag which assumes closed world. I can't see how to check the assumes-closed-world code in without it being an ordeal. I'll leave it in a branch in case anyone wants to finish the long slog to the merge.
Diffstat (limited to 'src/compiler/scala/tools/reflect/ToolBoxFactory.scala')
-rw-r--r--src/compiler/scala/tools/reflect/ToolBoxFactory.scala4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/reflect/ToolBoxFactory.scala b/src/compiler/scala/tools/reflect/ToolBoxFactory.scala
index 6a495cfcee..fdc2613810 100644
--- a/src/compiler/scala/tools/reflect/ToolBoxFactory.scala
+++ b/src/compiler/scala/tools/reflect/ToolBoxFactory.scala
@@ -126,7 +126,9 @@ abstract class ToolBoxFactory[U <: JavaUniverse](val u: U) { factorySelf =>
verify(expr0)
// need to wrap the expr, because otherwise you won't be able to typecheck macros against something that contains free vars
- var (expr, freeTerms) = extractFreeTerms(expr0, wrapFreeTermRefs = false)
+ val exprAndFreeTerms = extractFreeTerms(expr0, wrapFreeTermRefs = false)
+ var expr = exprAndFreeTerms._1
+ val freeTerms = exprAndFreeTerms._2
val dummies = freeTerms.map{ case (freeTerm, name) => ValDef(NoMods, name, TypeTree(freeTerm.info), Select(Ident(PredefModule), newTermName("$qmark$qmark$qmark"))) }.toList
expr = Block(dummies, wrapIntoTerm(expr))