diff options
author | Eugene Burmako <xeno.by@gmail.com> | 2012-06-07 15:02:56 +0200 |
---|---|---|
committer | Eugene Burmako <xeno.by@gmail.com> | 2012-06-08 15:32:33 +0200 |
commit | 07f7baa21c165d6c2302a8ea26c475968e7d775e (patch) | |
tree | f0edee8eefe208d463f56d961470a0f198e9da4d /src/reflect | |
parent | 0b2f1bcf75d31c59b25e19eebcb80f39c155365b (diff) | |
download | scala-07f7baa21c165d6c2302a8ea26c475968e7d775e.tar.gz scala-07f7baa21c165d6c2302a8ea26c475968e7d775e.tar.bz2 scala-07f7baa21c165d6c2302a8ea26c475968e7d775e.zip |
backward compatibility bridges
More information can be found here:
https://groups.google.com/group/scala-internals/msg/138efc5476751269
Diffstat (limited to 'src/reflect')
-rw-r--r-- | src/reflect/scala/reflect/internal/Definitions.scala | 18 | ||||
-rw-r--r-- | src/reflect/scala/reflect/internal/Trees.scala | 3 |
2 files changed, 21 insertions, 0 deletions
diff --git a/src/reflect/scala/reflect/internal/Definitions.scala b/src/reflect/scala/reflect/internal/Definitions.scala index d55b38224d..a7c4c84e4a 100644 --- a/src/reflect/scala/reflect/internal/Definitions.scala +++ b/src/reflect/scala/reflect/internal/Definitions.scala @@ -169,6 +169,18 @@ trait Definitions extends api.StandardDefinitions { // symbols related to packages var emptypackagescope: Scope = null //debug + @deprecated("Moved to rootMirror.RootPackage", "2.10.0") + val RootPackage: ModuleSymbol = rootMirror.RootPackage + + @deprecated("Moved to rootMirror.RootClass", "2.10.0") + val RootClass: ClassSymbol = rootMirror.RootClass + + @deprecated("Moved to rootMirror.EmptyPackage", "2.10.0") + val EmptyPackage: ModuleSymbol = rootMirror.EmptyPackage + + @deprecated("Moved to rootMirror.EmptyPackageClass", "2.10.0") + val EmptyPackageClass: ClassSymbol = rootMirror.RootClass + // It becomes tricky to create dedicated objects for other symbols because // of initialization order issues. lazy val JavaLangPackage = getRequiredPackage(sn.JavaLang) @@ -946,6 +958,12 @@ trait Definitions extends api.StandardDefinitions { attr } + @deprecated("Moved to rootMirror.getClass", "2.10.0") + def getClass(fullname: Name): ClassSymbol = rootMirror.getClassByName(fullname) + + @deprecated("Moved to rootMirror.getModule", "2.10.0") + def getModule(fullname: Name): ModuleSymbol = rootMirror.getModule(fullname) + private def fatalMissingSymbol(owner: Symbol, name: Name, what: String = "member") = { throw new FatalError(owner + " does not have a " + what + " " + name) } diff --git a/src/reflect/scala/reflect/internal/Trees.scala b/src/reflect/scala/reflect/internal/Trees.scala index 11d0790100..75bb0e6d49 100644 --- a/src/reflect/scala/reflect/internal/Trees.scala +++ b/src/reflect/scala/reflect/internal/Trees.scala @@ -1266,6 +1266,9 @@ trait Trees extends api.Trees { self: SymbolTable => // --- specific traversers and transformers + @deprecated("Moved to tree.duplicate", "2.10.0") + protected[scala] def duplicateTree(tree: Tree): Tree = tree.duplicate + class ForeachPartialTreeTraverser(pf: PartialFunction[Tree, Tree]) extends Traverser { override def traverse(tree: Tree) { val t = if (pf isDefinedAt tree) pf(tree) else tree |