|
W030 Redefined Namespace
[Previous]  [Next] 
|
![]() |
User Manual [Previous]  [Next] W030 Redefined NamespaceUmple semantic warning reported when a class is declared in separate places to be in two namespacesSince a class can only be in one namespace, the last namespace declaration overides earlier ones. This can sometimes be useful, e.g. when creating a mixin to change the default location of a class. However, it is normally a sign of a mistake, hence the warning. Example
// This example generates the message
// Namespace b, encountered later, will
// be the namespace of the class
namespace a;
class X30redefnamespace {
}
namespace b;
class X30redefnamespace {
}
Load the above code into UmpleOnline |