File tree Expand file tree Collapse file tree 1 file changed +11
-5
lines changed
compiler/src/dotty/tools/dotc/core Expand file tree Collapse file tree 1 file changed +11
-5
lines changed Original file line number Diff line number Diff line change @@ -538,11 +538,17 @@ object Contexts {
538
538
case _ => new Typer
539
539
}
540
540
541
- override def toString : String = {
542
- def iinfo (using Context ) = if (ctx.importInfo == null ) " " else i " ${ctx.importInfo.selectors}%, % "
543
- " Context(\n " +
544
- (outersIterator.map(ctx => s " owner = ${ctx.owner}, scope = ${ctx.scope}, import = ${iinfo(using ctx)}" ).mkString(" \n " ))
545
- }
541
+ override def toString : String =
542
+ def iinfo (using Context ) =
543
+ if (ctx.importInfo == null ) " " else i " ${ctx.importInfo.selectors}%, % "
544
+ def cinfo (using Context ) =
545
+ val core = s " owner = ${ctx.owner}, scope = ${ctx.scope}, import = ${iinfo(using ctx)}"
546
+ if (ctx ne NoContext ) && (ctx.implicits ne ctx.outer.implicits) then
547
+ s " $core, implicits = ${ctx.implicits}"
548
+ else
549
+ core
550
+ s """ Context(
551
+ | ${outersIterator.map(ctx => cinfo(using ctx)).mkString(" \n\n " )}) """ .stripMargin
546
552
547
553
def settings : ScalaSettings = base.settings
548
554
def definitions : Definitions = base.definitions
You can’t perform that action at this time.
0 commit comments