Skip to content

Commit 2ea4ecd

Browse files
committed
Rename prefix --> showAsPrefix
1 parent 744a3d4 commit 2ea4ecd

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

compiler/src/dotty/tools/dotc/cc/CaptureSet.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1310,7 +1310,7 @@ object CaptureSet:
13101310
res.myTrace = cs1 :: this.myTrace
13111311
res
13121312

1313-
override def prefix(using Context) = cs match
1313+
override def showAsPrefix(using Context) = cs match
13141314
case cs: Var =>
13151315
!cs.levelOK(elem)
13161316
|| cs.isBadRoot(elem) && elem.isInstanceOf[FreshCap]

compiler/src/dotty/tools/dotc/reporting/Message.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ object Message:
4747
/** Should the note be shown before the actual message or after?
4848
* Default is after.
4949
*/
50-
def prefix(using Context): Boolean = false
50+
def showAsPrefix(using Context): Boolean = false
5151

5252
/** The note rendered as part of an error message */
5353
def render(using Context): String

compiler/src/dotty/tools/dotc/reporting/messages.scala

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -343,7 +343,7 @@ class TypeMismatch(val found: Type, expected: Type, val inTree: Option[untpd.Tre
343343
mapOver(tp)
344344
case _ =>
345345
mapOver(tp)
346-
val preface = notes.filter(_.prefix).map(_.render).mkString
346+
val preface = notes.filter(_.showAsPrefix).map(_.render).mkString
347347
val found1 = reported(found)
348348
reported.setVariance(-1)
349349
val expected1 = reported(expected)
@@ -359,7 +359,7 @@ class TypeMismatch(val found: Type, expected: Type, val inTree: Option[untpd.Tre
359359
def importSuggestions =
360360
if expected.isTopType || found.isBottomType then ""
361361
else ctx.typer.importSuggestionAddendum(ViewProto(found.widen, expected))
362-
notes.filter(!_.prefix).map(_.render).mkString ++ super.msgPostscript ++ importSuggestions
362+
notes.filter(!_.showAsPrefix).map(_.render).mkString ++ super.msgPostscript ++ importSuggestions
363363

364364
override def explain(using Context) =
365365
val treeStr = inTree.map(x => s"\nTree:\n\n${x.show}\n").getOrElse("")

0 commit comments

Comments
 (0)