diff options
author | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-05-24 16:51:12 +0200 |
---|---|---|
committer | Hubert Plociniczak <hubert.plociniczak@gmail.com> | 2012-05-24 16:51:12 +0200 |
commit | 540315c781e19e717990f250c3ac3c6bd2721031 (patch) | |
tree | 6216d1a93ff57676ee7697136773afcd7203a383 | |
parent | f406550146250f5a6036d3d778582efa6d68252a (diff) | |
download | scala-540315c781e19e717990f250c3ac3c6bd2721031.tar.gz scala-540315c781e19e717990f250c3ac3c6bd2721031.tar.bz2 scala-540315c781e19e717990f250c3ac3c6bd2721031.zip |
Cleaning up some code introduced for the old presentation compiler long time ago. Review by @dragos
-rw-r--r-- | src/compiler/scala/tools/nsc/Global.scala | 14 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Namers.scala | 6 | ||||
-rw-r--r-- | src/compiler/scala/tools/nsc/typechecker/Typers.scala | 4 |
3 files changed, 1 insertions, 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)) { |