Guards of constant value false are not permitted

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P3
    • 19
    • Affects Version/s: 19
    • Component/s: tools
    • None
    • b24

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

            Assignee:
            Angelos Bimpoudis
            Reporter:
            Jan Lahoda
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved: