New utilitly method to create scope with some elements.
git-svn-id: http://lampsvn.epfl.ch/svn-repos/scala/scala/trunk@25523 5e8d7ff9-d8ef-0310-90f0-a4852d11357a
This commit is contained in:
parent
ffa3d7d3a6
commit
c6a4a7a72b
|
@ -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 {
|
||||
|
|
Loading…
Reference in New Issue