Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8311825

Duplicate qualified enum constants not detected

    XMLWordPrintable

Details

    • Bug
    • Resolution: Fixed
    • P3
    • 21
    • 21
    • tools
    • None
    • b32

    Backports

      Description

        This code compiles fine:
        ```
        public enum QualEnum {
            A, B;
            private void test() {
                switch (this) {
                   case QualEnum.A -> {}
                   case QualEnum.A -> {}
                   case QualEnum.B -> {}
                }
            }
        }
        ```

        although it should not.

        Attachments

          Issue Links

            Activity

              People

                jlahoda Jan Lahoda
                jlahoda Jan Lahoda
                Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                  Created:
                  Updated:
                  Resolved: