<html><head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
  </head>
  <body>
    <font size="4"><font face="monospace">Small wording nit...  in "an
        unnamed declaration can be used in place of the following
        declarations"<br>
        <br>
        I'm not sure "in place of" is the right wording; I think you may
        just want to say "in", since the grammar permits it in all of
        these places.  (What you're really doing here is signalling that
        there are places the grammar allows it, but the semantics do
        not; you are going to call these out individually in the
        appropriate places.)<br>
        <br>
        Similar for the second "in place of" in this section.<br>
        <br>
        In 14.11.1, I might refactor the text a little further.  The
        second sentence of the first paragraph below is about case
        constants only, but now comes after you talk about case patterns
        or case constants:<br>
        <br>
      </font></font>
    <blockquote type="cite">
      <p style="padding: 0pt; margin: 1ex 0em; color: rgb(0, 0, 0);
        font-family: "DejaVu Sans", "Bitstream Vera
        Sans", "Luxi Sans", Verdana, Arial, Helvetica,
        sans-serif; font-size: 13.3333px; font-style: normal;
        font-variant-ligatures: normal; font-variant-caps: normal;
        font-weight: 400; letter-spacing: normal; orphans: 2;
        text-align: start; text-indent: 0px; text-transform: none;
        white-space: normal; widows: 2; word-spacing: 0px;
        -webkit-text-stroke-width: 0px; text-decoration-thickness:
        initial; text-decoration-style: initial; text-decoration-color:
        initial;">A<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>label
        has either one or more<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>constants,
        or<span> </span><del style="background-color: rgb(255, 224,
          224); text-decoration: line-through;">a</del><strong style="background-color: rgb(208, 255, 208); font-weight:
          inherit; text-decoration: underline;">one or more</strong><span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>pattern<strong style="background-color: rgb(208, 255, 208); font-weight:
          inherit; text-decoration: underline;">s</strong>. Every<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>constant
        must be either (1) the<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">null</code><span> </span>literal,
        (2) a constant expression (<a href="https://docs.oracle.com/javase/specs/jls/se19/html/jls-15.html#jls-15.29" style="text-decoration: none; color: rgb(74, 103, 130);">15.29</a>),
        or (3) the name of an enum constant (<a href="https://docs.oracle.com/javase/specs/jls/se19/html/jls-8.html#jls-8.9.1" style="text-decoration: none; color: rgb(74, 103, 130);">8.9.1</a>);
        otherwise a compile-time error occurs. A<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>label
        that has a<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">null</code><span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>constant
        may have an optional<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">default</code>.</p>
      <div class="inserted" style="background-color: rgb(208, 255, 208);
        font-weight: 400; text-decoration: underline; color: rgb(0, 0,
        0); font-family: "DejaVu Sans", "Bitstream Vera
        Sans", "Luxi Sans", Verdana, Arial, Helvetica,
        sans-serif; font-size: 13.3333px; font-style: normal;
        font-variant-ligatures: normal; font-variant-caps: normal;
        letter-spacing: normal; orphans: 2; text-align: start;
        text-indent: 0px; text-transform: none; white-space: normal;
        widows: 2; word-spacing: 0px; -webkit-text-stroke-width: 0px;">
        <p style="padding: 0pt; margin: 0pt 0em 1ex;">It is a
          compile-time error if for any<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>label
          with more than one<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>patterns,
          any of its<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>patterns
          declares one or more pattern variables.</p>
      </div>
    </blockquote>
    <br>
    I suggest:<br>
    <br>
    A<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>label
    has either one or more<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>constants,
    or<span> </span><del style="background-color: rgb(255, 224, 224);
      text-decoration: line-through;">a</del><strong style="background-color: rgb(208, 255, 208); font-weight: inherit;
      text-decoration: underline;">one or more</strong><span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>pattern<strong style="background-color: rgb(208, 255, 208); font-weight: inherit;
      text-decoration: underline;">s</strong>. <br>
    <br>
    <i>For a case label with case constants, </i>every<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>constant
    must be either (1) the<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">null</code><span> </span>literal,
    (2) a constant expression (<a href="https://docs.oracle.com/javase/specs/jls/se19/html/jls-15.html#jls-15.29" style="text-decoration: none; color: rgb(74, 103, 130);">15.29</a>),
    or (3) the name of an enum constant (<a href="https://docs.oracle.com/javase/specs/jls/se19/html/jls-8.html#jls-8.9.1" style="text-decoration: none; color: rgb(74, 103, 130);">8.9.1</a>);
    otherwise a compile-time error occurs. A<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>label
    that has a<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">null</code><span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>constant
    may have an optional<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">default</code>.<br>
    <br>
    <i>For a case label with case patterns</i>, it is a compile-time
    error if any of its<span> </span><code style="white-space: pre-wrap; font-family: "DejaVu Sans Mono", "Bitstream Vera Sans Mono", "Luxi Mono", "Courier New", monospace;">case</code><span> </span>patterns
    declares one or more pattern variables.<br>
    <br>
    I am not sure about the definition of dominance here.  If I have:<br>
    <br>
        case Integer _, String _:  A;<br>
        case Number _ : B;<br>
    <br>
    Number dominates Integer, but it doesn't dominate Integer|String.  I
    think you mean "if at least one of pi..pn dominates *all* of the
    patterns ri..rm, no?  <br>
    <br>
    But I'm not even sure if this is the right formulation, because:<br>
    <br>
        sealed interface I permits A, B { }<br>
        record A() implements I {}<br>
        record B() implements I {}<br>
    <br>
        case A _, B _: ...<br>
        case I i: ...<br>
    <br>
    The first case label dominates I.  So I think you have to appeal to
    exhaustiveness:<br>
    <br>
    "A case label with case patterns p1...pm dominates another case
    label with case patterns q1...qm if the set of patterns { p1..pm }
    dominates each qi", no?<br>
    <br>
    You probably have to slightly refactor the second statement about
    "compile time error if dominance" accordingly.<br>
    <br>
    <br>
    <br>
    <br>
    <div class="moz-cite-prefix">On 1/26/2023 5:36 AM, Angelos Bimpoudis
      wrote:<br>
    </div>
    <blockquote type="cite" cite="mid:SA2PR10MB4667ADD0F0F8D862E22ED17D82CF9@SA2PR10MB4667.namprd10.prod.outlook.com">
      
      <style type="text/css" style="display:none;">P {margin-top:0;margin-bottom:0;}</style>
      <div style="font-family: "Segoe UI", "Segoe UI Web
        (West European)", "Helvetica Neue", sans-serif;
        font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255,
        255, 255);" class="elementToProof ContentPasted0">
        Dear experts,</div>
      <div style="font-family: "Segoe UI", "Segoe UI Web
        (West European)", "Helvetica Neue", sans-serif;
        font-size: 11pt; color: rgb(0, 0, 0); background-color: rgb(255,
        255, 255);" class="elementToProof ContentPasted0">
        <div><br class="ContentPasted0">
        </div>
        <div class="ContentPasted0">The first draft of the JLS spec
          about unnamed patterns and variables
          (<a class="moz-txt-link-freetext" href="https://openjdk.org/jeps/8294349">https://openjdk.org/jeps/8294349</a>) is available at:</div>
        <div><br class="ContentPasted0">
        </div>
        <div class="ContentPasted0"><a class="moz-txt-link-freetext" href="https://cr.openjdk.java.net/~abimpoudis/unnamed/latest/">https://cr.openjdk.java.net/~abimpoudis/unnamed/latest/</a></div>
        <div><br class="ContentPasted0">
        </div>
        <div class="ContentPasted0">Comments very much welcomed!</div>
        Angelos<br>
      </div>
    </blockquote>
    <br>
  </body>
</html>