Permalink
Browse files

Cleaning up some code introduced for the old presentation compiler lo…

…ng time ago. Review by @dragos
  • Loading branch information...
hubertp committed May 24, 2012
1 parent f406550 commit 540315c781e19e717990f250c3ac3c6bd2721031
@@ -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?)
*/
@@ -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)
}
@@ -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)) {

0 comments on commit 540315c

Please sign in to comment.