summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSean McDirmid <sean.mcdirmid@gmail.com>2008-07-15 10:34:58 +0000
committerSean McDirmid <sean.mcdirmid@gmail.com>2008-07-15 10:34:58 +0000
commit239bd13d4b78a0e9eefa2e058dcaef71018f45b4 (patch)
tree85428b704765960aa475b2eebe624e472a6c8e2e
parent45a3c3aeeffb2f0e932b1edc8c5af739ff2b1d3c (diff)
downloadscala-239bd13d4b78a0e9eefa2e058dcaef71018f45b4.tar.gz
scala-239bd13d4b78a0e9eefa2e058dcaef71018f45b4.tar.bz2
scala-239bd13d4b78a0e9eefa2e058dcaef71018f45b4.zip
Updating SymbolLoaders to ensure during refresh...
Updating SymbolLoaders to ensure during refresh that a directory is still a directory. (only in the IDE)
-rw-r--r--src/compiler/scala/tools/nsc/symtab/IdeSupport.scala7
-rw-r--r--src/compiler/scala/tools/nsc/symtab/SymbolLoaders.scala2
2 files changed, 7 insertions, 2 deletions
diff --git a/src/compiler/scala/tools/nsc/symtab/IdeSupport.scala b/src/compiler/scala/tools/nsc/symtab/IdeSupport.scala
index b9bb67309e..09396a1748 100644
--- a/src/compiler/scala/tools/nsc/symtab/IdeSupport.scala
+++ b/src/compiler/scala/tools/nsc/symtab/IdeSupport.scala
@@ -102,7 +102,7 @@ trait IdeSupport extends SymbolTable { // added to global, not analyzers.
}
} else if (sym.hasGetter) {
e = scope lookupEntry nme.getterName(sym.name)
- while (e != null && !e.sym.isGetter && e.sym.accessed != sym) {
+ while (e != null && !e.sym.isGetter && (!e.sym.hasFlag(ACCESSOR) || e.sym.accessed != sym)) {
e = scope lookupNextEntry e
}
if (e != null && check(e.sym.accessed == sym, "accessed" + e.sym.accessed +" vs. " + sym) && check(!e.sym.isSetter, "setter: " + e.sym)) {
@@ -414,6 +414,11 @@ trait IdeSupport extends SymbolTable { // added to global, not analyzers.
}
}
if (true) {
+ if (symbol.isInstanceOf[TypeSymbol] && symbol.name.toString == "B") {
+ assert(true)
+ assert(true)
+ }
+
//Console.println("NEW SYMBOL: " + symbol + ":" + symbol.id + " @ " + symbol.owner + " " + key);
}
diff --git a/src/compiler/scala/tools/nsc/symtab/SymbolLoaders.scala b/src/compiler/scala/tools/nsc/symtab/SymbolLoaders.scala
index f698e171d2..7e27a3618a 100644
--- a/src/compiler/scala/tools/nsc/symtab/SymbolLoaders.scala
+++ b/src/compiler/scala/tools/nsc/symtab/SymbolLoaders.scala
@@ -168,7 +168,7 @@ abstract class SymbolLoaders {
val classes = new HashMap[String, global.classPath0.Context]
val packages = new HashMap[String, global.classPath0.Context]
- for (dir <- directory.entries) if (dir.location ne null) {
+ for (dir <- directory.entries) if ((dir.location ne null) && (!inIDE || dir.location.isDirectory)) {
for (file <- dir.location) {
if (file.isDirectory && directory.validPackage(file.name) && !packages.isDefinedAt(file.name))
packages(file.name) = directory.find(file.name, true);