private void addTypeCheckPattern(@NotNull PsiPattern sourcePattern,
                                   @NotNull PsiPattern innerPattern,
                                   @NotNull PsiType checkType,
                                   @NotNull DeferredOffset endPatternOffset,
                                   @NotNull DfaVariableValue patternDfaVar,
                                   @Nullable DfaAnchor instanceofAnchor) {
    if (sourcePattern == innerPattern || !JavaPsiPatternUtil.isUnconditionalForType(innerPattern, checkType)) {
      addPatternTypeTest(innerPattern, instanceofAnchor, endPatternOffset, patternDfaVar, checkType);
    }
    else {
      addInstruction(new SimpleAssignmentInstruction(null, patternDfaVar));
    }
  }
private void addTypeCheckPattern(@NotNull PsiPattern sourcePattern,
                                   @NotNull PsiPattern innerPattern,
                                   @NotNull PsiType checkType,
                                   @NotNull DeferredOffset endPatternOffset,
                                   @NotNull DfaVariableValue patternDfaVar,
                                   @Nullable DfaAnchor instanceofAnchor)