<div dir="ltr">I`ve filed the issue and opened corresponding pull request with fix: <a href="https://github.com/openjdk/jdk/pull/19878">https://github.com/openjdk/jdk/pull/19878</a>. Hope issue gets published soon</div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 25, 2024 at 1:11 PM Olexandr Rotan <<a href="mailto:rotanolexandr842@gmail.com">rotanolexandr842@gmail.com</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><p dir="ltr">Hello Remi. Have you created issue related to this bug? It seems like it has been around for quite a while based on what I saw in block parsing code of javac</p>
<br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Tue, Jun 25, 2024, 10:05 Remi Forax <<a href="mailto:forax@univ-mlv.fr" target="_blank">forax@univ-mlv.fr</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hello,<br>
javac is not able to parse "yield _ -> ...".<br>
<br>
Here is a reproducer.<br>
<br>
public class SwitchYieldAndUnderscore {<br>
  public static void main(String[] args) {<br>
    Consumer<String> value = switch (args[0]) {<br>
      case "foo" -> {<br>
        yield _ -> {};<br>
      }<br>
      default -> throw new AssertionError();<br>
    };<br>
  }<br>
}<br>
<br>
regards,<br>
Rémi<br>
</blockquote></div>
</blockquote></div>