// RUN: clang-cc -fsyntax-only -verify %s template class MetaFun, typename Value> struct apply { typedef typename MetaFun::type type; }; template struct add_pointer { typedef T* type; }; template struct add_reference { typedef T& type; }; int i; apply::type ip = &i; apply::type ir = i; apply::type fr = i; // expected-error{{non-const lvalue reference to type 'float' cannot be initialized with a value of type 'int'}}