diff options
author | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-04 15:04:32 +0000 |
---|---|---|
committer | Roman Divacky <rdivacky@FreeBSD.org> | 2009-11-04 15:04:32 +0000 |
commit | 51fb8b013e7734b795139f49d3b1f77c539be20a (patch) | |
tree | 59e0e47a9831dcf0e21e547927c8ebb7e113bfd1 /test/SemaTemplate/instantiate-method.cpp | |
parent | 73490b890977362d28dd6326843a1ecae413921d (diff) |
Diffstat (limited to 'test/SemaTemplate/instantiate-method.cpp')
-rw-r--r-- | test/SemaTemplate/instantiate-method.cpp | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/test/SemaTemplate/instantiate-method.cpp b/test/SemaTemplate/instantiate-method.cpp index f7c09ef879008..df1e1d964eb6d 100644 --- a/test/SemaTemplate/instantiate-method.cpp +++ b/test/SemaTemplate/instantiate-method.cpp @@ -81,3 +81,20 @@ int *a(A0<int> &x0, A1<int> &x1) { int *y0 = x0; int *y1 = x1; // expected-error{{initializing}} } + +struct X0Base { + int &f(); +}; + +template<typename T> +struct X0 : X0Base { +}; + +template<typename U> +struct X1 : X0<U> { + int &f2() { return X0Base::f(); } +}; + +void test_X1(X1<int> x1i) { + int &ir = x1i.f2(); +} |