Skip to content

Commit ba06519

Browse files
committed
Review comment: ${cycleSym} -> $cycleSym
1 parent b4a8d45 commit ba06519

File tree

1 file changed

+8
-8
lines changed

1 file changed

+8
-8
lines changed

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

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1263,24 +1263,24 @@ object messages {
12631263
case class OverloadedOrRecursiveMethodNeedsResultType(methodName: Names.TermName, cycleSym: Symbol)(implicit ctx: Context)
12641264
extends Message(OverloadedOrRecursiveMethodNeedsResultTypeID) {
12651265
val kind = "Syntax"
1266-
val msg = hl"""overloaded or recursive ${cycleSym} needs return type"""
1266+
val msg = hl"""overloaded or recursive $cycleSym needs return type"""
12671267
val explanation =
1268-
hl"""Case 1: ${cycleSym} is overloaded
1269-
|If there are multiple methods named `${cycleSym}` and at least one definition of
1268+
hl"""Case 1: $cycleSym is overloaded
1269+
|If there are multiple methods named `$cycleSym` and at least one definition of
12701270
|it calls another, you need to specify the calling method's return type.
12711271
|
1272-
|Case 2: ${cycleSym} is recursive
1273-
|If `${cycleSym}` calls itself on any path (even through mutual recursion), you need to specify the return type
1274-
|of `${cycleSym}` or of a definition it's mutually recursive with.
1272+
|Case 2: $cycleSym is recursive
1273+
|If `$cycleSym` calls itself on any path (even through mutual recursion), you need to specify the return type
1274+
|of `$cycleSym` or of a definition it's mutually recursive with.
12751275
|""".stripMargin
12761276
}
12771277

12781278
case class RecursiveValueNeedsResultType(valName: Names.TermName, cycleSym: Symbol)(implicit ctx: Context)
12791279
extends Message(RecursiveValueNeedsResultTypeID) {
12801280
val kind = "Syntax"
1281-
val msg = hl"""recursive ${cycleSym} needs type"""
1281+
val msg = hl"""recursive $cycleSym needs type"""
12821282
val explanation =
1283-
hl"""The definition of `${cycleSym}` is recursive and you need to specify its type.
1283+
hl"""The definition of `$cycleSym` is recursive and you need to specify its type.
12841284
|""".stripMargin
12851285
}
12861286

0 commit comments

Comments
 (0)