aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Scopes.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2013-03-07 10:57:58 +0100
committerMartin Odersky <odersky@gmail.com>2013-03-07 10:57:58 +0100
commit0a6bddc34dbfc9a667c7d63c1dc4de6ae04d7343 (patch)
treec0d1086447b374bc426de5bde0deb0f96215a732 /src/dotty/tools/dotc/core/Scopes.scala
parent519942ae5bf4bc6b1ba8f6e4a52447ddb974dad1 (diff)
downloaddotty-0a6bddc34dbfc9a667c7d63c1dc4de6ae04d7343.tar.gz
dotty-0a6bddc34dbfc9a667c7d63c1dc4de6ae04d7343.tar.bz2
dotty-0a6bddc34dbfc9a667c7d63c1dc4de6ae04d7343.zip
Some refinements for prining
Made trees printable in plain mode (refined mode still missing).
Diffstat (limited to 'src/dotty/tools/dotc/core/Scopes.scala')
-rw-r--r--src/dotty/tools/dotc/core/Scopes.scala6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/dotty/tools/dotc/core/Scopes.scala b/src/dotty/tools/dotc/core/Scopes.scala
index 0253cd60b..f8a125a3b 100644
--- a/src/dotty/tools/dotc/core/Scopes.scala
+++ b/src/dotty/tools/dotc/core/Scopes.scala
@@ -48,7 +48,7 @@ object Scopes {
* or to delete them. These methods are provided by subclass
* MutableScope.
*/
- abstract class Scope extends Iterable[Symbol] {
+ abstract class Scope extends Showable with Iterable[Symbol] {
/** The last scope-entry from which all others are reachable via `prev` */
private[dotc] def lastEntry: ScopeEntry
@@ -109,6 +109,8 @@ object Scopes {
/** Cast this scope to a mutable scope */
final def openForMutations: MutableScope = this.asInstanceOf[MutableScope]
+
+ final def show(implicit ctx: Context): String = ctx.show(this)
}
/** A subclass of Scope that defines methods for entering and
@@ -293,8 +295,6 @@ object Scopes {
if (filtered eq unfiltered) this
else newScopeWith(filtered: _*)
}
-
- final def show(implicit ctx: Context): String = ctx.show(this)
}
/** Create a new scope */