* tree.c (walk_tree): Don't walk into default args.

From-SVN: r36985
This commit is contained in:
Jason Merrill 2000-10-20 17:31:25 -04:00
parent ba523395f1
commit 05c1707ca2
1 changed files with 31 additions and 0 deletions

View File

@ -0,0 +1,31 @@
// Build don't link:
// Origin: Jakub Jelinek <jakub@redhat.com>
// Special g++ Options: -O1
class Type;
template<class E>
class X
{
public:
X<E>();
inline X<E>(int);
inline ~X<E>();
};
template<class E> const Type &foo(const X<E> *);
template<class E> inline X<E>::X(int x)
{
const Type &a = foo(this);
}
template<class E> inline X<E>::~X()
{
const Type &a = foo(this);
}
class Y
{
X<Type> a;
public:
Y(const X<Type> &x = X<Type>());
};
Y::Y(const X<Type> &x) : a(1)
{
}