aboutsummaryrefslogtreecommitdiff
path: root/src/dotty
diff options
context:
space:
mode:
Diffstat (limited to 'src/dotty')
-rw-r--r--src/dotty/tools/dotc/core/Contexts.scala3
-rw-r--r--src/dotty/tools/dotc/printing/RefinedPrinter.scala9
2 files changed, 8 insertions, 4 deletions
diff --git a/src/dotty/tools/dotc/core/Contexts.scala b/src/dotty/tools/dotc/core/Contexts.scala
index 4f95ff247..b662326c5 100644
--- a/src/dotty/tools/dotc/core/Contexts.scala
+++ b/src/dotty/tools/dotc/core/Contexts.scala
@@ -189,7 +189,6 @@ object Contexts {
private var phasedCtx: Context = _
private var phasedCtxs: Array[Context] = _
-
/** This context at given phase.
* This method will always return a phase period equal to phaseId, thus will never return squashed phases
*/
@@ -211,7 +210,7 @@ object Contexts {
final def withPhase(phase: Phase): Context =
withPhase(phase.id)
- /** If -Ydebug is on, the top of the stack trace where this context
+ /** If -Ydebug is on, the top of the stack trace where this context
* was created, otherwise `null`.
*/
private var creationTrace: Array[StackTraceElement] = _
diff --git a/src/dotty/tools/dotc/printing/RefinedPrinter.scala b/src/dotty/tools/dotc/printing/RefinedPrinter.scala
index 557a2b5db..f9cd9ec72 100644
--- a/src/dotty/tools/dotc/printing/RefinedPrinter.scala
+++ b/src/dotty/tools/dotc/printing/RefinedPrinter.scala
@@ -3,7 +3,7 @@ package printing
import core._
import Texts._, Types._, Flags._, Names._, Symbols._, NameOps._, Constants._
-import Contexts.Context, Scopes.Scope, Denotations.Denotation, Annotations.Annotation
+import Contexts.Context, Scopes.Scope, Denotations._, Annotations.Annotation
import StdNames.nme
import ast.{Trees, untpd}
import typer.Namer
@@ -475,7 +475,12 @@ class RefinedPrinter(_ctx: Context) extends PlainPrinter(_ctx) {
Text(flags.flagStrings.filterNot(_.startsWith("<")) map stringToText, " ")
}
- override def toText(denot: Denotation): Text = toText(denot.symbol)
+ override def toText(denot: Denotation): Text = denot match {
+ case denot: MultiDenotation => denot.toString
+ case _ =>
+ if (denot.symbol.exists) toText(denot.symbol)
+ else "some " ~ toText(denot.info)
+ }
override def plain = new PlainPrinter(_ctx)
}