File tree Expand file tree Collapse file tree 4 files changed +5
-5
lines changed
compiler/src/dotty/tools/dotc Expand file tree Collapse file tree 4 files changed +5
-5
lines changed Original file line number Diff line number Diff 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"
Original file line number Diff line number Diff 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
Original file line number Diff line number Diff line change 11-- [E083] Syntax Error: tests/neg/i6795-b.scala:1:11 -------------------------------------------------------------------
221 |sealed def y: Int = 1 // error
33 | ^
4- | Modifier(s) sealed not allowed for method
4+ | Modifier(s) ` sealed` not allowed for method
55
66longer explanation available when compiling with `-explain`
Original file line number Diff line number Diff line change 11-- Error: tests/neg/i6795.scala:1:13 -----------------------------------------------------------------------------------
221 |erased class Foo // error
33 |^^^^^^^^^^^^^^^^
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