summaryrefslogtreecommitdiff
path: root/src/compiler/scala/tools/nsc/typechecker/Namers.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2006-01-23 18:57:47 +0000
committerMartin Odersky <odersky@gmail.com>2006-01-23 18:57:47 +0000
commit91cb19d56861c80c2968e3ede2fef7ccab5f38ec (patch)
tree32ffaeae5a79367c0f96c66f0012b610d8914466 /src/compiler/scala/tools/nsc/typechecker/Namers.scala
parent9007f0b447640219b942d2fab29a0cd22c7b5b26 (diff)
downloadscala-91cb19d56861c80c2968e3ede2fef7ccab5f38ec.tar.gz
scala-91cb19d56861c80c2968e3ede2fef7ccab5f38ec.tar.bz2
scala-91cb19d56861c80c2968e3ede2fef7ccab5f38ec.zip
Diffstat (limited to 'src/compiler/scala/tools/nsc/typechecker/Namers.scala')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Namers.scala11
1 files changed, 8 insertions, 3 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
index 1850d2dc29..5ab522b101 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
@@ -82,17 +82,21 @@ trait Namers requires Analyzer {
(if (sym.hasFlag(CASE)) "case class " + sym.name else sym.toString()));
def enterInScope(sym: Symbol): Symbol = {
+ // allow for overloaded methods
if (!(sym.isSourceMethod && sym.owner.isClass)) {
val prev = context.scope.lookupEntry(sym.name);
if (prev != null && prev.owner == context.scope && !prev.sym.isSourceMethod) {
+/*
if (sym.sourceFile == null && prev.sym.sourceFile == null) {}
+
else if (sym.sourceFile != null && prev.sym.sourceFile != null &&
sym.sourceFile.equals(prev.sym.sourceFile)) {}
else {
System.err.println("SYM: " + sym.sourceFile);
System.err.println("PRV: " + prev.sym.sourceFile);
- doubleDefError(sym.pos, prev.sym);
- }
+*/
+ doubleDefError(sym.pos, prev.sym);
+// }
}
}
context.scope enter sym;
@@ -151,7 +155,8 @@ trait Namers requires Analyzer {
m = context.owner.newModule(pos, name);
m.setFlag(flags);
m.moduleClass.setFlag(flags | inConstructorFlag);
- m.moduleClass.sourceFile = context.unit.source.getFile();
+ if (m.owner.isPackageClass)
+ m.moduleClass.sourceFile = context.unit.source.getFile();
enterInScope(m)
}
if (m.owner.isPackageClass) currentRun.symSource(m) = context.unit.source.getFile();