diff options
author | Jason Merrill <jason@redhat.com> | 2000-08-11 20:02:49 -0400 |
---|---|---|
committer | Jason Merrill <jason@gcc.gnu.org> | 2000-08-11 20:02:49 -0400 |
commit | e69c807271479a7c4e9efcc0340d24c8832936ee (patch) | |
tree | 6b29c92973d922ef6f392a6d9ec4a4ce8fbc02e4 /gcc/testsuite | |
parent | 058557c4d1b036386daf2f124ab829e5371e0dfa (diff) | |
download | gcc-e69c807271479a7c4e9efcc0340d24c8832936ee.zip gcc-e69c807271479a7c4e9efcc0340d24c8832936ee.tar.gz gcc-e69c807271479a7c4e9efcc0340d24c8832936ee.tar.bz2 |
decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're looking inside.
* decl.c (lookup_name_real): Don't forget the TYPENAME_TYPE we're
looking inside.
From-SVN: r35650
Diffstat (limited to 'gcc/testsuite')
-rw-r--r-- | gcc/testsuite/g++.old-deja/g++.ext/typename1.C | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/gcc/testsuite/g++.old-deja/g++.ext/typename1.C b/gcc/testsuite/g++.old-deja/g++.ext/typename1.C new file mode 100644 index 0000000..31de28f --- /dev/null +++ b/gcc/testsuite/g++.old-deja/g++.ext/typename1.C @@ -0,0 +1,32 @@ +// Bug: g++ forgets about the instantiation of class1 when looking up +// class11_value, and tries to look things up in class1<class2>. + +// Special g++ Options: + +template<class ItIsInt> +struct class1 { + struct class11 { + typedef ItIsInt class11_value; + }; +}; + +template<class ItIsClass2> +struct class3 { + int f(); +}; + +template<class ItIsClass2> +int class3<ItIsClass2>::f() +{ + return class1<typename ItIsClass2::class2_value>::class11::class11_value(10); +} + +struct class2 { + typedef int class2_value; +}; + +int main() +{ + class3<class2> the_class3; + the_class3.f(); +} |