summaryrefslogtreecommitdiff
path: root/src/compiler
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2009-10-28 23:04:03 +0000
committerMartin Odersky <odersky@gmail.com>2009-10-28 23:04:03 +0000
commit9a9fece5c40f0a8198f74b37f74d4953a7bda781 (patch)
tree465f5bb13476f4016aee9f2d2771afef9ffff07a /src/compiler
parentb4084fc9c0c00c159245a6c18230ba6d60bab4af (diff)
downloadscala-9a9fece5c40f0a8198f74b37f74d4953a7bda781.tar.gz
scala-9a9fece5c40f0a8198f74b37f74d4953a7bda781.tar.bz2
scala-9a9fece5c40f0a8198f74b37f74d4953a7bda781.zip
changed standard library so that it does not re...
changed standard library so that it does not rely in scala package object in initial bootstrap of Predef. Disabled reading scala package during that bootstrap. This is an attempt to solve the cyclic reference errors in #2501.
Diffstat (limited to 'src/compiler')
-rw-r--r--src/compiler/scala/tools/nsc/typechecker/Namers.scala7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/compiler/scala/tools/nsc/typechecker/Namers.scala b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
index ce4856b9e6..330c80bd4c 100644
--- a/src/compiler/scala/tools/nsc/typechecker/Namers.scala
+++ b/src/compiler/scala/tools/nsc/typechecker/Namers.scala
@@ -359,7 +359,7 @@ trait Namers { self: Analyzer =>
tree.symbol = enterModuleSymbol(tree)
tree.symbol.moduleClass.setInfo(namerOf(tree.symbol).moduleClassTypeCompleter((tree)))
finish
- if (tree.symbol.name == nme.PACKAGEkw) {
+ if (tree.symbol.name == nme.PACKAGEkw && tree.symbol.owner != ScalaPackageClass) {
loaders.openPackageModule(tree.symbol)
}
@@ -1132,6 +1132,11 @@ trait Namers { self: Analyzer =>
newNamer(context.makeNewScope(tree, sym)).classSig(tparams, impl)
case ModuleDef(_, _, impl) =>
+ /** no, does not work here.
+ if (tree.symbol.name == nme.PACKAGEkw) {
+ loaders.openPackageModule(tree.symbol)
+ }
+ */
val clazz = sym.moduleClass
clazz.setInfo(newNamer(context.makeNewScope(tree, clazz)).templateSig(impl))
//clazz.typeOfThis = singleType(sym.owner.thisType, sym);