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

Guards of constant value false are not permitted

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P3 P3
    • 19
    • 19
    • tools
    • None
    • b24

      javac should produce a compile-time error for code like:
      ---
          switch (Object o) {
              case String s when false -> {}
              default -> {}
          }
      --

            abimpoudis Angelos Bimpoudis
            jlahoda Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: