summaryrefslogtreecommitdiff
path: root/gcc/testsuite/g++.dg/lookup/using55.C
diff options
context:
space:
mode:
Diffstat (limited to 'gcc/testsuite/g++.dg/lookup/using55.C')
-rw-r--r--gcc/testsuite/g++.dg/lookup/using55.C19
1 files changed, 19 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.dg/lookup/using55.C b/gcc/testsuite/g++.dg/lookup/using55.C
new file mode 100644
index 0000000000..61098b186f
--- /dev/null
+++ b/gcc/testsuite/g++.dg/lookup/using55.C
@@ -0,0 +1,19 @@
+// PR c++/65721
+
+template<typename T>
+struct A {
+ typedef T D;
+};
+
+template<typename X>
+class B : public A<X> {
+ using typename B::D; // { dg-error "not a base" }
+public:
+ D echo(D x) { // { dg-error "D" }
+ return x;
+ }
+};
+
+int main() {
+ B<int> b;
+}