File tree 4 files changed +5
-5
lines changed
compiler/src/dotty/tools/dotc 4 files changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -1504,7 +1504,7 @@ object messages {
1504
1504
case class AbstractMemberMayNotHaveModifier (sym : Symbol , flag : FlagSet )(
1505
1505
implicit ctx : Context )
1506
1506
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"""
1508
1508
val kind : String = " Syntax"
1509
1509
val explanation : String = " "
1510
1510
}
@@ -1697,7 +1697,7 @@ object messages {
1697
1697
case class ModifiersNotAllowed (flags : FlagSet , printableType : Option [String ])(implicit ctx : Context )
1698
1698
extends Message (ModifiersNotAllowedID ) {
1699
1699
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" )}"
1701
1701
val explanation : String = {
1702
1702
val first = " sealed def y: Int = 1"
1703
1703
val second = " sealed lazy class z"
Original file line number Diff line number Diff line change @@ -284,7 +284,7 @@ class Namer { typer: Typer =>
284
284
case _ => (flags.isTermFlags, flags.toTermFlags, " value" )
285
285
}
286
286
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)
288
288
adapted
289
289
}
290
290
Original file line number Diff line number Diff line change 1
1
-- [E083] Syntax Error: tests/neg/i6795-b.scala:1:11 -------------------------------------------------------------------
2
2
1 |sealed def y: Int = 1 // error
3
3
| ^
4
- | Modifier(s) sealed not allowed for method
4
+ | Modifier(s) ` sealed` not allowed for method
5
5
6
6
longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change 1
1
-- Error: tests/neg/i6795.scala:1:13 -----------------------------------------------------------------------------------
2
2
1 |erased class Foo // error
3
3
|^^^^^^^^^^^^^^^^
4
- |modifier(s) `erased' incompatible with type definition
4
+ |modifier(s) `erased` incompatible with type definition
You can’t perform that action at this time.
0 commit comments