From 540315c781e19e717990f250c3ac3c6bd2721031 Mon Sep 17 00:00:00 2001 From: Hubert Plociniczak Date: Thu, 24 May 2012 16:51:12 +0200 Subject: Cleaning up some code introduced for the old presentation compiler long time ago. Review by @dragos --- src/compiler/scala/tools/nsc/Global.scala | 14 -------------- src/compiler/scala/tools/nsc/typechecker/Namers.scala | 6 +----- src/compiler/scala/tools/nsc/typechecker/Typers.scala | 4 ---- 3 files changed, 1 insertion(+), 23 deletions(-) diff --git a/src/compiler/scala/tools/nsc/Global.scala b/src/compiler/scala/tools/nsc/Global.scala index c917ec9984..fb5b9b7169 100644 --- a/src/compiler/scala/tools/nsc/Global.scala +++ b/src/compiler/scala/tools/nsc/Global.scala @@ -1468,20 +1468,6 @@ class Global(var currentSettings: Settings, var reporter: Reporter) extends Symb refreshProgress } - /** - * Attempt to locate a source file providing the given name as a top-level - * definition in the given context, and add it to the run via compileLate - * if found. - */ - def compileSourceFor(context : analyzer.Context, name : Name) = false - - /** - * Attempt to locate a source file providing the given name as a top-level - * definition with the given prefix, and add it to the run via compileLate - * if found. - */ - def compileSourceFor(qual : Tree, name : Name) = false - /** Reset package class to state at typer (not sure what this * is needed for?) */ diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala index 2f2278251b..d75d9d5705 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala @@ -473,12 +473,8 @@ trait Namers extends MethodSynthesis { if (from != nme.WILDCARD && base != ErrorType) { if (isValid(from)) { - if (currentRun.compileSourceFor(expr, from)) { - // side effecting, apparently - typeSig(tree) - } // for Java code importing Scala objects - else if (!nme.isModuleName(from) || isValid(nme.stripModuleSuffix(from))) { + if (!nme.isModuleName(from) || isValid(nme.stripModuleSuffix(from))) { typer.TyperErrorGen.NotAMemberError(tree, expr, from) typer.infer.setError(tree) } diff --git a/src/compiler/scala/tools/nsc/typechecker/Typers.scala b/src/compiler/scala/tools/nsc/typechecker/Typers.scala index e40a567f1d..7bb9d5fef3 100644 --- a/src/compiler/scala/tools/nsc/typechecker/Typers.scala +++ b/src/compiler/scala/tools/nsc/typechecker/Typers.scala @@ -4422,10 +4422,6 @@ trait Typers extends Modes with Adaptations with Taggings { var cx = startingIdentContext while (defSym == NoSymbol && cx != NoContext && (cx.scope ne null)) { // cx.scope eq null arises during FixInvalidSyms in Duplicators - // !!! Shouldn't the argument to compileSourceFor be cx, not context? - // I can't tell because those methods do nothing in the standard compiler, - // presumably they are overridden in the IDE. - currentRun.compileSourceFor(context.asInstanceOf[analyzer.Context], name) pre = cx.enclClass.prefix defEntry = cx.scope.lookupEntry(name) if ((defEntry ne null) && qualifies(defEntry.sym)) { -- cgit v1.2.3