@NotNull
  private static PsiType resolveFieldType(@NotNull PsiField field, @NotNull PsiReferenceExpression referenceExpression) {
    PsiType rawType = field.getType();
    return referenceExpression.advancedResolve(false).getSubstitutor().substitute(rawType);
  }
@NotNull
  private static PsiType resolveFieldType(@NotNull PsiField field, @NotNull PsiReferenceExpression referenceExpression)