From b57adf65f5c3faa9d1afb4ee9614a02116a5fd4f Mon Sep 17 00:00:00 2001 From: peng Date: Wed, 4 Oct 2023 19:28:05 -0400 Subject: [PATCH] add spaces to infix display in BuiltInDiffMsg --- .../latest/splain/SplainFormattingExtension.scala | 2 +- .../plugin/VTypeDiffsDetailSpec/__direct/check | 13 ++++++++++++- 2 files changed, 13 insertions(+), 2 deletions(-) diff --git a/core/src/main/scala-2.13.7+/latest/splain/SplainFormattingExtension.scala b/core/src/main/scala-2.13.7+/latest/splain/SplainFormattingExtension.scala index cc8ed6b..7efc512 100644 --- a/core/src/main/scala-2.13.7+/latest/splain/SplainFormattingExtension.scala +++ b/core/src/main/scala-2.13.7+/latest/splain/SplainFormattingExtension.scala @@ -482,7 +482,7 @@ trait SplainFormattingExtension extends typechecker.splain.SplainFormatting with lazy val infixText = infixOpt match { case None => "|" - case Some(ii) => showFormattedLImpl(ii, break).flat + case Some(ii) => " " + showFormattedLImpl(ii, break).flat + " " } val indented = msg diff --git a/core/src/test/resources/splain/plugin/VTypeDiffsDetailSpec/__direct/check b/core/src/test/resources/splain/plugin/VTypeDiffsDetailSpec/__direct/check index 3845cd7..df4bedf 100644 --- a/core/src/test/resources/splain/plugin/VTypeDiffsDetailSpec/__direct/check +++ b/core/src/test/resources/splain/plugin/VTypeDiffsDetailSpec/__direct/check @@ -38,6 +38,7 @@ newSource1.scala:27: error: implicit error; add2(x.head) ^ + newSource1.scala:6: error: type mismatch; Long(in method add)|scala.Long ――(comparing |) @@ -55,7 +56,7 @@ newSource1.scala:6: error: type mismatch; newSource1.scala:16: error: implicit error; !I ev: Long(in method add) =:= scala.Long - ――(comparing =:=) + ――(comparing =:= ) found : Long(in method add) required: scala.Long Cannot prove that Long =:= Long. @@ -63,6 +64,16 @@ newSource1.scala:16: error: implicit error; add2(x.head) ^ newSource1.scala:27: error: implicit error; +!I ev: + Long(in method add) <:< scala.Long + ――(comparing <:< ) + found : Long(in method add) + required: scala.Long + Cannot prove that Long <:< Long. + + add2(x.head) + ^ +newSource1.scala:27: error: implicit error; !I ev: Long(in method add) <:< scala.Long ――(comparing <:<)