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 @@ -1781,14 +1781,11 @@ object messages {
1781
1781
extends Message (EnumCaseDefinitionInNonEnumOwnerID ) {
1782
1782
val kind = " Syntax"
1783
1783
val msg = em " case not allowed here, since owner ` ${owner}` is not an ` ${" enum" }` object "
1784
- val explanation = {
1785
-
1784
+ val explanation =
1786
1785
hl """
1787
1786
| ` ${" case" }` is only allowed at this place if the surrounding object is the companion object of an ` ${" enum" } ${" class" }`.
1788
1787
| If you wanted to create an enumeration make sure that the corresponding class has the ` ${" enum" }` keyword.
1789
1788
| Otherwise you might have forgotten ` ${" class" }` or ` ${" object" }` after this ` ${" case" }` here.
1790
- |
1791
- """ .stripMargin
1792
- }
1789
+ """
1793
1790
}
1794
1791
}
You can’t perform that action at this time.
0 commit comments