| 1 |
// RUN: %clang_cc1 -x c++ -std=c++14 -fsyntax-only -verify %s |
| 2 |
|
| 3 |
template <class A> |
| 4 |
using Type = typename A::NestedType; // expected-error {{type 'float' cannot be used prior to '::' because it has no members}} |
| 5 |
|
| 6 |
template <typename T> |
| 7 |
void Func() { |
| 8 |
using MyType = Type<T>(); // expected-note {{in instantiation of template type alias 'Type' requested here}} |
| 9 |
// This is a function declaration, not a variable declaration! |
| 10 |
// After substitution, we do not have a valid function type, and used to crash. |
| 11 |
MyType var; |
| 12 |
} |
| 13 |
|
| 14 |
void Test() { |
| 15 |
Func<float>(); // expected-note {{in instantiation of function template specialization 'Func<float>' requested here}} |
| 16 |
} |