g++.dg/lookup/exception1.C: New test.

From-SVN: r60763
This commit is contained in:
Nathanael Nerode 2003-01-01 21:03:50 +00:00
parent cd2801fb0b
commit faa75e896f
2 changed files with 35 additions and 0 deletions

View File

@ -1,5 +1,7 @@
2003-01-01 Nathanael Nerode <neroden@gcc.gnu.org>
g++.dg/lookup/exception1.C: New test.
g++.dg/lookup/template1.C: New test.
g++.dg/parse/namespace2.C: New test.

View File

@ -0,0 +1,33 @@
/* PR 2743 */
/* {dg-do compile} */
namespace ns {
class Exception
{
};
}
namespace ns
{
class Test {
public:
inline Test() throw( Exception );
inline Test(int n ) throw( Exception );
private:
int i;
};
}
// This line used to fail because Exception wasn't looked up in the
// right scope.
ns::Test::Test() throw( Exception ) : i( 1 )
{
}
ns::Test::Test( int n ) throw( Exception ) : i( n )
{
}
int main(int argc, char* argv) {
ns::Test test;
}