@NotNull
  OperationChain removeHeadCast(@NotNull ChainCompletionContext context) {
    LOG.assertTrue(getHead() instanceof TypeCast);
    ChainOperation[] newReverseOperations = Arrays.copyOf(myReverseOperations, length() - 1);
    return new OperationChain(Objects.requireNonNull(context.resolvePsiClass(myHeadMethodCall.getQualifierDef())),
                              newReverseOperations,
                              myHeadMethodCall,
                              myHeadMethodCall,
                              getChainWeight());
  }
@NotNull
  OperationChain removeHeadCast(@NotNull ChainCompletionContext context)