Skip to content

Commit 825d92e

Browse files
committed
Make constraints on error message IDs clearer
1 parent 6563f65 commit 825d92e

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

compiler/src/dotty/tools/dotc/reporting/ErrorMessageID.scala

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,16 @@
11
package dotty.tools.dotc.reporting
22

3+
//////////////////////////////////////////////////////////////////////////
4+
// IMPORTANT //
5+
// Only add new IDs at end of the enumeration list and never remove IDs //
6+
//////////////////////////////////////////////////////////////////////////
7+
38
/** Unique IDs identifying the messages, this will be used to reference documentation online.
49
*
510
* @param isActive Whether or not the compile still emits this ErrorMessageID
611
**/
712
enum ErrorMessageID(val isActive: Boolean = true) extends java.lang.Enum[ErrorMessageID]:
813

9-
// IMPORTANT: Add new IDs only at the end and never remove IDs
10-
1114
case NoExplanationID // errorNumber: -1
1215

1316
case EmptyCatchOrFinallyBlockID extends ErrorMessageID(isActive = false) // errorNumber: 0

0 commit comments

Comments
 (0)