From 9d90361eeb76f3b090a96033e20ed1a272c3493c Mon Sep 17 00:00:00 2001 From: Martin Odersky Date: Thu, 17 Jul 2014 15:44:10 +0200 Subject: Add showDcl method for SingleDenotations --- src/dotty/tools/dotc/core/Denotations.scala | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'src/dotty/tools/dotc/core') diff --git a/src/dotty/tools/dotc/core/Denotations.scala b/src/dotty/tools/dotc/core/Denotations.scala index 43fff62ec..022230ff8 100644 --- a/src/dotty/tools/dotc/core/Denotations.scala +++ b/src/dotty/tools/dotc/core/Denotations.scala @@ -619,7 +619,7 @@ object Denotations { throw new StaleSymbol(msg) } - /** The period (interval of phases) for which there exists + /** The period (interval of phases) for which there exists * a valid denotation in this flock. */ def coveredInterval(implicit ctx: Context): Period = { @@ -641,11 +641,15 @@ object Denotations { */ def syncWithParents(implicit ctx: Context): SingleDenotation = this + /** Show declaration string; useful for showing declarations + * as seen from subclasses. + */ + def showDcl(implicit ctx: Context): String = ctx.dclText(this).show + override def toString = if (symbol == NoSymbol) symbol.toString else s"" - def definedPeriodsString: String = { var sb = new StringBuilder() var cur = this -- cgit v1.2.3