Language: C++

#include <iostream>
template<class T>class L{L<T*>operator->()};L<int>i=i->

int main(){
 while(1){
}
}

Compiler output:
a.cc:2:42: error: expected ';' at end of member declaration
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                          ^
      |                                           ;
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc: In instantiation of 'L<T*> L<T>::operator->() [with T = int]':
a.cc:2:54:   required from here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int*]' is private within this context
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int**]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int***]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int****]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int*****]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int******]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int*******]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int********]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int*********]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int**********]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int***********]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int************]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int*************]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int**************]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int***************]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int****************]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int*****************]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int******************]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int*******************]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int********************]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int*********************]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int**********************]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int***********************]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int************************]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~~~~~~
a.cc:2:54: error: 'L<T*> L<T>::operator->() [with T = int*************************]' is private within this context
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                                                      ^~
a.cc:2:31: note: declared private here
    2 | template<class T>class L{L<T*>operator->()};L<int>i=i->
      |                               ^~~