May 31, 2005 [bug] using namespace leaks into surrounding namespace. | ||||
|---|---|---|---|---|
| ||||
The following shouldn't compile, but does. The commented line will fail
as expected if it's includeed.
namespace n1
{
struct x {};
}
namespace n2
{
void y() { using namespace n1; }
//x a;
}
n2::x b;
This also causes the following code to fail with an 'ambiguous reference
to symbol' error:
namespace n1
{
struct x {};
}
namespace n2
{
void y() { using namespace n1; }
struct x {};
}
n2::x a;
| ||||
Copyright © 1999-2021 by the D Language Foundation
Permalink
Reply