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

Parsing of erroneous patterns succeeds

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 21
    • 21
    • tools
    • None
    • b24
    • b25

              boolean t1 = switch (obj) {
                  case Long a[] -> true;
                  default -> false;
              };
              boolean t2 = switch (obj) {
                  case Double a[][][][] -> true;
                      default -> false;
              };
              if (obj instanceof Float a[][]) {
              }
              if (obj instanceof Integer a = Integer.valueOf(0)) {
              }

            abimpoudis Angelos Bimpoudis
            abimpoudis Angelos Bimpoudis
            Votes:
            0 Vote for this issue
            Watchers:
            4 Start watching this issue

              Created:
              Updated:
              Resolved: