summaryrefslogtreecommitdiff
path: root/src/library/scala/reflect/base/Scopes.scala
diff options
context:
space:
mode:
Diffstat (limited to 'src/library/scala/reflect/base/Scopes.scala')
-rw-r--r--src/library/scala/reflect/base/Scopes.scala21
1 files changed, 21 insertions, 0 deletions
diff --git a/src/library/scala/reflect/base/Scopes.scala b/src/library/scala/reflect/base/Scopes.scala
new file mode 100644
index 0000000000..a5db01c0ce
--- /dev/null
+++ b/src/library/scala/reflect/base/Scopes.scala
@@ -0,0 +1,21 @@
+package scala.reflect
+package base
+
+trait Scopes { self: Universe =>
+
+ type Scope >: Null <: Iterable[Symbol]
+
+ /** A tag that preserves the identity of the `Scope` abstract type from erasure.
+ * Can be used for pattern matching, instance tests, serialization and likes.
+ */
+ implicit val ScopeTag: ClassTag[Scope]
+
+ /** Create a new scope */
+ def newScope: Scope
+
+ /** Create a new scope nested in another one with which it shares its elements */
+ def newNestedScope(outer: Scope): Scope
+
+ /** Create a new scope with given initial elements */
+ def newScopeWith(elems: Symbol*): Scope
+} \ No newline at end of file