<div dir="ltr"><div style="font-family:monospace" class="gmail_default">And if I replace that snippet with this, I get the expected and desirable compiler error "didn't cover all switch cases" (referring to the parent switch where that statement is actually true).</div><div style="font-family:monospace" class="gmail_default"><br></div><div style="font-family:monospace" class="gmail_default"><br>   public List<Symbol> stateTransitions(final InternalState internalState)<br>   {<br>   <br>      return<br>         switch (this)<br>         {<br>         <br>            case C         -> ADD_SYMBOLS.apply(List.of(NUMBER, SUB_STATE_OPERATOR), List.of());<br>            case CE        -> ADD_SYMBOLS.apply(List.of(NUMBER, SUB_STATE_OPERATOR), List.of(C));<br>            case BACKSPACE -> switch (internalState)<br>                              {<br>                              <br>                                 case InternalState(_, ConsEmpty(), _, _, _, _)  -> ADD_SYMBOLS.apply(List.of(NUMBER, SUB_STATE_OPERATOR), List.of(C, CE));<br>                                 case InternalState is                           -> ADD_SYMBOLS.apply(List.of(NUMBER, SUB_STATE_OPERATOR, SCREEN_OPERATOR), List.of());<br>                              <br>                              };<br>         <br>         };<br>   <br>   }<br></div></div>