Skip to content

Commit b8b4790

Browse files
committed
Define dummy as unused error message id
I am exasperated how over-engineered and badly designed the error message architecture is. Error messages used to be simple strings but are now a complete mess. Latest installment: Error message ids are an enum. So if a message is no longer needed, you can drop the enum value, right? Wrong! The error message tests rely on the actual ordinal number printed, so they fail if that number changes.
1 parent 12a5d66 commit b8b4790

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

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

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -91,6 +91,7 @@ enum ErrorMessageID extends java.lang.Enum[ErrorMessageID] {
9191
ExpectedTopLevelDefID,
9292
AnonymousFunctionMissingParamTypeID,
9393
SuperCallsNotAllowedInlineableID,
94+
UNUSED1, // not used anymore, but left so that error numbers stay the same
9495
WildcardOnTypeArgumentNotAllowedOnNewID,
9596
FunctionTypeNeedsNonEmptyParameterListID,
9697
WrongNumberOfParametersID,

0 commit comments

Comments
 (0)