File tree Expand file tree Collapse file tree 1 file changed +2
-5
lines changed
compiler/src/dotty/tools/dotc/reporting/diagnostic Expand file tree Collapse file tree 1 file changed +2
-5
lines changed Original file line number Diff line number Diff line change @@ -1774,14 +1774,11 @@ object messages {
1774
1774
extends Message (EnumCaseDefinitionInNonEnumOwnerID ) {
1775
1775
val kind = " Syntax"
1776
1776
val msg = em " case not allowed here, since owner ` ${owner}` is not an ` ${" enum" }` object "
1777
- val explanation = {
1778
-
1777
+ val explanation =
1779
1778
hl """
1780
1779
| ` ${" case" }` is only allowed at this place if the surrounding object is the companion object of an ` ${" enum" } ${" class" }`.
1781
1780
| If you wanted to create an enumeration make sure that the corresponding class has the ` ${" enum" }` keyword.
1782
1781
| Otherwise you might have forgotten ` ${" class" }` or ` ${" object" }` after this ` ${" case" }` here.
1783
- |
1784
- """ .stripMargin
1785
- }
1782
+ """
1786
1783
}
1787
1784
}
You can’t perform that action at this time.
0 commit comments