File tree Expand file tree Collapse file tree 3 files changed +6
-9
lines changed
test/dotty/tools/dotc/reporting Expand file tree Collapse file tree 3 files changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -2496,7 +2496,7 @@ object Parsers {
24962496 }
24972497 else if (! isStatSep && (in.token != CASE )) {
24982498 exitOnError = mustStartStat
2499- syntaxErrorOrIncomplete(IllegalStartOfStatement (isModifier = isModifier ))
2499+ syntaxErrorOrIncomplete(IllegalStartOfStatement (isModifier))
25002500 }
25012501 acceptStatSepUnlessAtEnd(CASE )
25022502 }
Original file line number Diff line number Diff line change @@ -1882,12 +1882,10 @@ object messages {
18821882
18831883 case class IllegalStartOfStatement (isModifier : Boolean )(implicit ctx : Context ) extends Message (IllegalStartOfStatementID ) {
18841884 val kind = " Syntax"
1885- private val addendum = if (isModifier) " (no modifiers allowed here)" else " "
1886- val msg = hl " Illegal start of statement $addendum"
1887- val explanation = hl """
1888- | Expected an import, a statement or an expression at the start of a statement.
1889- | For a detailed list of allowed statements, please consult the syntax of BlockStat at http://dotty.epfl.ch/docs/internals/syntax.html#expressions
1890- """
1891-
1885+ val msg = {
1886+ val addendum = if (isModifier) " (no modifiers allowed here)" else " "
1887+ hl " Illegal start of statement $addendum"
1888+ }
1889+ val explanation = hl " A statement is either an import, a definition or an expression. "
18921890 }
18931891}
Original file line number Diff line number Diff line change @@ -1140,7 +1140,6 @@ class ErrorMessagesTests extends ErrorMessagesTest {
11401140 | { ) }
11411141 | { private ) }
11421142 |}
1143- |
11441143 """ .stripMargin
11451144 }
11461145 .expect { (ictx, messages) =>
You can’t perform that action at this time.
0 commit comments