<meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><div>Hi!</div><div><br></div><div>I wanted to write the following one-line lambda</div><div><br></div><div>Consumer<X> f = x -> switch (x) {</div><div>  case L1 -> System.out.println("!");</div><div>}</div><div><br></div><div>Provided L1 the only instance of enum X. </div><div><br></div><div>The above lambda has to be rewritten as a block-lambda because my switch returns void. Can we allow this case?</div><div><br></div><div><hr style="margin: 0 0 10px 0;border: 0;border-bottom:1px solid #E6E8EB;height:0;line-height:0;font-size:0;padding: 20px 0 0 0;width: 50px;"><div class="xm_write_text_sign">Regards,<br>Tesla</div></div>