Permalink
Browse files

backward compatibility bridges

  • Loading branch information...
xeno-by committed Jun 7, 2012
1 parent 0b2f1bc commit 07f7baa21c165d6c2302a8ea26c475968e7d775e
@@ -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)
}
@@ -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

0 comments on commit 07f7baa

Please sign in to comment.