Erroneous exhaustivity check with boolean switch

XMLWordPrintable

    • Type: Bug
    • Resolution: Fixed
    • Priority: P4
    • 24
    • Affects Version/s: None
    • Component/s: tools
    • None
    • b08

      Currently javac erroneously does not accept the following switch:

      Boolean bool = null;
      var _ = switch (bool) {
      case null -> "nothing";
      case true -> "something true";
      case false -> "something false";
      };

            Assignee:
            Angelos Bimpoudis
            Reporter:
            Angelos Bimpoudis
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: