Test for invalid C++17 nested namespace aliases
This commit is contained in:
parent
220247c130
commit
aa6d7931ac
2 changed files with 37 additions and 0 deletions
34
Examples/test-suite/errors/cpp_nested_namespace_alias.i
Normal file
34
Examples/test-suite/errors/cpp_nested_namespace_alias.i
Normal file
|
|
@ -0,0 +1,34 @@
|
|||
%module cpp_nested_namespace_alias
|
||||
|
||||
// C++17 nested namespaces
|
||||
|
||||
namespace A
|
||||
{
|
||||
namespace B
|
||||
{
|
||||
void ab1();
|
||||
}
|
||||
}
|
||||
namespace A::B
|
||||
{
|
||||
void ab2();
|
||||
}
|
||||
namespace AAlias = A;
|
||||
namespace AAlias::B
|
||||
{
|
||||
void ab3();
|
||||
}
|
||||
namespace A
|
||||
{
|
||||
namespace BAlias = B;
|
||||
void ab4();
|
||||
}
|
||||
namespace A::BAlias
|
||||
{
|
||||
void ab5();
|
||||
}
|
||||
namespace ABAlias = A::B;
|
||||
namespace ABAlias
|
||||
{
|
||||
void ab6();
|
||||
}
|
||||
|
|
@ -0,0 +1,3 @@
|
|||
cpp_nested_namespace_alias.i:18: Warning 308: Namespace alias 'AAlias' not allowed here. Assuming 'A'
|
||||
cpp_nested_namespace_alias.i:27: Warning 308: Namespace alias 'BAlias' not allowed here. Assuming 'B'
|
||||
cpp_nested_namespace_alias.i:32: Warning 308: Namespace alias 'ABAlias' not allowed here. Assuming 'B'
|
||||
Loading…
Add table
Add a link
Reference in a new issue