// RUN: %clang_cc1 -fsyntax-only -verify -std=c++11 %s namespace Old { template class TT> struct X { }; template struct Y { }; template using Z = Y; X y; X z; using SameType = decltype(y); // expected-note {{here}} using SameType = decltype(z); // expected-error {{different types}} } namespace New { template struct X { }; template struct Y { }; template using Z = Y; X> y; X> z; using SameType = decltype(y); using SameType = decltype(z); // ok }