summaryrefslogtreecommitdiff
path: root/src/compiler/scala/reflect/internal/Scopes.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2011-08-19 16:25:32 +0000
committerMartin Odersky <odersky@gmail.com>2011-08-19 16:25:32 +0000
commit7a5ea2758ed4377feedd00e2acbb16274116a910 (patch)
tree3707b8f632d02765e22da28b6cb9025362be04cc /src/compiler/scala/reflect/internal/Scopes.scala
parent6ba1b9f3c974351e826485ca9c41df732c6de15a (diff)
downloadscala-7a5ea2758ed4377feedd00e2acbb16274116a910.tar.gz
scala-7a5ea2758ed4377feedd00e2acbb16274116a910.tar.bz2
scala-7a5ea2758ed4377feedd00e2acbb16274116a910.zip
New utilitly method to create scope with some e...
New utilitly method to create scope with some elements.
Diffstat (limited to 'src/compiler/scala/reflect/internal/Scopes.scala')
-rw-r--r--src/compiler/scala/reflect/internal/Scopes.scala7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/compiler/scala/reflect/internal/Scopes.scala b/src/compiler/scala/reflect/internal/Scopes.scala
index c150abc7db..9cd67375ac 100644
--- a/src/compiler/scala/reflect/internal/Scopes.scala
+++ b/src/compiler/scala/reflect/internal/Scopes.scala
@@ -311,6 +311,13 @@ trait Scopes extends api.Scopes { self: SymbolTable =>
def newScope: Scope = new Scope
+ def newScopeWith(elems: Symbol*) = {
+ val scope = newScope
+ elems foreach scope.enter
+ scope
+ }
+
+
/** The empty scope (immutable).
*/
object EmptyScope extends Scope {