#include <iostream>

class vtkArray 
{
public:
  void PrintSelf(std::ostream &os) { 
    std::cout << "vtkArray PrintSelf" << std::endl;
  }
};

template<class ThisT, class BaseT>
class vtkTypeTemplate : public BaseT
{
public:
  typedef BaseT Superclass;
};

template<typename T>
class vtkTypedArray : public vtkTypeTemplate<vtkTypedArray<T>, vtkArray>
{
public:
  void PrintSelf(std::ostream &os);
};

template<typename T>
void vtkTypedArray<T>::PrintSelf(std::ostream &os)
{
  this->vtkTypedArray<T>::Superclass::PrintSelf(os); // ERROR
}

int main (int argc, char const *argv[])
{
  vtkTypedArray<int> array;
  array.PrintSelf(std::cout);
  return 0;
}
