Skip to content

Commit 1a2682b

Browse files
committed
Let ErrorMessageId extend java.lang.Enum
This is necessary so that enum constants come with the class not the companion object which was in turn necessary to let the bootstrapped build pass. Two questions: 1) It seems the bootstrapped build got confused. It seemed it compiled against the previous ErrorMesssageID.java and ran against the ErrorMessageID.scala. 2) In any case, it would be good if enum constants were always generated at the same place, no matter whether we extend java.lang.Enum or not.
1 parent 8817b15 commit 1a2682b

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
package dotty.tools.dotc.reporting.diagnostic
22

33
/** Unique IDs identifying the messages */
4-
enum ErrorMessageID {
4+
enum ErrorMessageID extends java.lang.Enum[ErrorMessageID] {
55

66
// IMPORTANT: Add new IDs only at the end and never remove IDs
77
case

0 commit comments

Comments
 (0)