File tree Expand file tree Collapse file tree 2 files changed +6
-10
lines changed
compiler/src/dotty/tools/dotc/reporting Expand file tree Collapse file tree 2 files changed +6
-10
lines changed Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ trait MessageRendering {
119
119
else s " ${pos.source.file.toString}: offset ${pos.start} (missing source file) "
120
120
val errId =
121
121
if (message.errorId ne ErrorMessageID .NoExplanationID ) {
122
- val errorNumber = message.errorId.errorNumber()
122
+ val errorNumber = message.errorId.errorNumber
123
123
s " [E ${" 0" * (3 - errorNumber.toString.length) + errorNumber}] "
124
124
} else " "
125
125
val kind =
Original file line number Diff line number Diff line change 1
- package dotty .tools .dotc .reporting .diagnostic ;
1
+ package dotty .tools .dotc .reporting .diagnostic
2
2
3
3
/** Unique IDs identifying the messages */
4
- public enum ErrorMessageID {
5
-
6
- // IMPORTANT: Add new IDs only at the end and never remove IDs
4
+ enum ErrorMessageID {
7
5
6
+ // IMPORTANT: Add new IDs only at the end and never remove IDs
7
+ case
8
8
LazyErrorId , // // errorNumber: -2
9
9
NoExplanationID , // errorNumber: -1
10
10
@@ -146,10 +146,6 @@ public enum ErrorMessageID {
146
146
StableIdentPatternID ,
147
147
StaticFieldsShouldPrecedeNonStaticID ,
148
148
IllegalSuperAccessorID
149
- ;
150
-
151
- public int errorNumber () {
152
- return ordinal () - 2 ;
153
- }
154
149
150
+ def errorNumber = ordinal - 2
155
151
}
You can’t perform that action at this time.
0 commit comments