diff --git a/src/compiler/scala/reflect/internal/Scopes.scala b/src/compiler/scala/reflect/internal/Scopes.scala index 73b02a70c..12f2b92ff 100644 --- a/src/compiler/scala/reflect/internal/Scopes.scala +++ b/src/compiler/scala/reflect/internal/Scopes.scala @@ -310,6 +310,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). */