aboutsummaryrefslogtreecommitdiff
path: root/src/dotty/tools/dotc/core/Denotations.scala
diff options
context:
space:
mode:
authorMartin Odersky <odersky@gmail.com>2014-07-17 15:44:10 +0200
committerMartin Odersky <odersky@gmail.com>2014-08-03 17:28:33 +0200
commit9d90361eeb76f3b090a96033e20ed1a272c3493c (patch)
tree1bc0b0e1cf37102e28fa72361e71a7a4e86ae83b /src/dotty/tools/dotc/core/Denotations.scala
parent2cb905004b28707b4c127e5a1848084109ddb3db (diff)
downloaddotty-9d90361eeb76f3b090a96033e20ed1a272c3493c.tar.gz
dotty-9d90361eeb76f3b090a96033e20ed1a272c3493c.tar.bz2
dotty-9d90361eeb76f3b090a96033e20ed1a272c3493c.zip
Add showDcl method for SingleDenotations
Diffstat (limited to 'src/dotty/tools/dotc/core/Denotations.scala')
-rw-r--r--src/dotty/tools/dotc/core/Denotations.scala8
1 files changed, 6 insertions, 2 deletions
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"<SingleDenotation of type $infoOrCompleter>"
-
def definedPeriodsString: String = {
var sb = new StringBuilder()
var cur = this