Skip to content

Commit 18a49e8

Browse files
committed
Use same quotes
1 parent 22d6ee5 commit 18a49e8

File tree

4 files changed

+5
-5
lines changed

4 files changed

+5
-5
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1504,7 +1504,7 @@ object messages {
15041504
case class AbstractMemberMayNotHaveModifier(sym: Symbol, flag: FlagSet)(
15051505
implicit ctx: Context)
15061506
extends Message(AbstractMemberMayNotHaveModifierID) {
1507-
val msg: String = em"""${hl("abstract")} $sym may not have `${flag.flagsString}' modifier"""
1507+
val msg: String = em"""${hl("abstract")} $sym may not have `${flag.flagsString}` modifier"""
15081508
val kind: String = "Syntax"
15091509
val explanation: String = ""
15101510
}
@@ -1697,7 +1697,7 @@ object messages {
16971697
case class ModifiersNotAllowed(flags: FlagSet, printableType: Option[String])(implicit ctx: Context)
16981698
extends Message(ModifiersNotAllowedID) {
16991699
val kind: String = "Syntax"
1700-
val msg: String = em"Modifier(s) ${flags.flagsString} not allowed for ${printableType.getOrElse("combination")}"
1700+
val msg: String = em"Modifier(s) `${flags.flagsString}` not allowed for ${printableType.getOrElse("combination")}"
17011701
val explanation: String = {
17021702
val first = "sealed def y: Int = 1"
17031703
val second = "sealed lazy class z"

compiler/src/dotty/tools/dotc/typer/Namer.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -284,7 +284,7 @@ class Namer { typer: Typer =>
284284
case _ => (flags.isTermFlags, flags.toTermFlags, "value")
285285
}
286286
if (!ok)
287-
ctx.error(i"modifier(s) `${flags.flagsString}' incompatible with $kind definition", tree.sourcePos)
287+
ctx.error(i"modifier(s) `${flags.flagsString}` incompatible with $kind definition", tree.sourcePos)
288288
adapted
289289
}
290290

tests/neg/i6795-b.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
-- [E083] Syntax Error: tests/neg/i6795-b.scala:1:11 -------------------------------------------------------------------
22
1 |sealed def y: Int = 1 // error
33
| ^
4-
| Modifier(s) sealed not allowed for method
4+
| Modifier(s) `sealed` not allowed for method
55

66
longer explanation available when compiling with `-explain`

tests/neg/i6795.check

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
-- Error: tests/neg/i6795.scala:1:13 -----------------------------------------------------------------------------------
22
1 |erased class Foo // error
33
|^^^^^^^^^^^^^^^^
4-
|modifier(s) `erased' incompatible with type definition
4+
|modifier(s) `erased` incompatible with type definition

0 commit comments

Comments
 (0)