public static @Nullable PsiType getDeconstructedImplicitPatternType(@NotNull PsiPattern pattern) {
    PsiRecordComponent recordComponent = getRecordComponentForPattern(pattern);
    if (recordComponent != null) {
      PsiDeconstructionList deconstructionList = ObjectUtils.tryCast(pattern.getParent(), PsiDeconstructionList.class);
      if (deconstructionList == null) return null;
      PsiDeconstructionPattern deconstructionPattern = (PsiDeconstructionPattern)deconstructionList.getParent();
      PsiType patternType = deconstructionPattern.getTypeElement().getType();
      if (patternType instanceof PsiClassType) {
        patternType = PsiUtil.captureToplevelWildcards(patternType, pattern);
        PsiSubstitutor substitutor = ((PsiClassType)patternType).resolveGenerics().getSubstitutor();
        PsiType recordComponentType = recordComponent.getType();
        return JavaVarTypeUtil.getUpwardProjection(substitutor.substitute(recordComponentType));
      }
    }
    return null;
  }
public static @Nullable PsiType getDeconstructedImplicitPatternType(@NotNull PsiPattern pattern)