@NotNull
  private static String typeName(@NotNull PsiType type, @Nullable PsiType erasedType) {
    if (erasedType == null) {
      String typeName = type.getCanonicalText();
      int typeParameterIndex = typeName.indexOf('<');
      if (typeParameterIndex != -1) {
        typeName = typeName.substring(0, typeParameterIndex);
      }

      LOG.warn("Type erasure failed, the following type used instead: " + typeName);
      return typeName;
    }

    return erasedType.getCanonicalText();
  }
@NotNull
  private static String typeName(@NotNull PsiType type, @Nullable PsiType erasedType)