Skip to content

Commit 6b522cc

Browse files
Enno Runnefelixmulder
Enno Runne
authored andcommitted
Use Message ID enum
1 parent 4352a4a commit 6b522cc

File tree

2 files changed

+3
-2
lines changed

2 files changed

+3
-2
lines changed

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

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ public enum ErrorMessageID {
4848
OverridesNothingID,
4949
OverridesNothingButNameExistsID,
5050
ForwardReferenceExtendsOverDefinitionID,
51-
ExpectedTokenButFoundID;
51+
ExpectedTokenButFoundID,
52+
MixedLeftAndRightAssociativeOpsID;
5253

5354
public int errorNumber() {
5455
return ordinal() - 2;

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1094,7 +1094,7 @@ object messages {
10941094
}
10951095

10961096
case class MixedLeftAndRightAssociativeOps(op1: Name, op2: Name, op2LeftAssoc: Boolean)(implicit ctx: Context)
1097-
extends Message(41) {
1097+
extends Message(MixedLeftAndRightAssociativeOpsID) {
10981098
val kind = "Syntax"
10991099
val op1Asso = if (op2LeftAssoc) "which is right-associative" else "which is left-associative"
11001100
val op2Asso = if (op2LeftAssoc) "which is left-associative" else "which is right-associative"

0 commit comments

Comments
 (0)