File tree Expand file tree Collapse file tree 1 file changed +4
-7
lines changed
compiler/src/dotty/tools/dotc/reporting/diagnostic Expand file tree Collapse file tree 1 file changed +4
-7
lines changed Original file line number Diff line number Diff line change @@ -1773,18 +1773,15 @@ object messages {
1773
1773
case class EnumCaseDefinitionInNonEnumOwner (owner : Symbol )(implicit ctx : Context )
1774
1774
extends Message (EnumCaseDefinitionInNonEnumOwnerID ) {
1775
1775
val kind = " Syntax"
1776
- val msg = em " case not allowed here, since owner ${owner} is not an `enum' object "
1776
+ val msg = em " case not allowed here, since owner ` ${owner}` is not an `${ " enum" } ` object"
1777
1777
val explanation = {
1778
1778
1779
1779
hl """
1780
- | ${" case" } is only allowed at this place if the surrounding object is the companion object of an `enum class`.
1781
- | If you wanted to create an enumeration make sure that the corresponding class has the `enum` keyword.
1782
- | Otherwise you might have forgotten `class` or `object` after this `enum` .
1780
+ | ` ${" case" }` is only allowed at this place if the surrounding object is the companion object of an `${ " enum" } ${ " class" } `.
1781
+ | If you wanted to create an enumeration make sure that the corresponding class has the ` ${ " enum" } ` keyword.
1782
+ | Otherwise you might have forgotten ` ${ " class" } ` or ` ${ " object" } ` after this ` ${ " case " } ` here .
1783
1783
|
1784
- | See http://dotty.epfl.ch/docs/reference/enums/enums.html for more details on enumerations.
1785
1784
""" .stripMargin
1786
1785
}
1787
-
1788
1786
}
1789
-
1790
1787
}
You can’t perform that action at this time.
0 commit comments