Partially disabling old names generation for classes with nspace
This commit is contained in:
parent
869de3e761
commit
3028b16cee
3 changed files with 29 additions and 15 deletions
|
|
@ -62,6 +62,14 @@ sc = ns.Outer.SomeClass()
|
|||
assert( sc:GetInner1ColorChannel() ~= sc:GetInner2Channel() )
|
||||
assert( sc:GetInner1Channel() ~= sc:GetInner2Channel() )
|
||||
|
||||
-- Backward compatibility
|
||||
assert(ns.Outer.Inner1.Diffuse ~= nil)
|
||||
-- Enums within class within namespace shouldn't have backward compatible name. Same for static methods
|
||||
assert(ns.Outer.Inner1.Color_Diffuse == nil)
|
||||
assert(ns.Outer.Inner1.Color_colorStaticMethod == nil)
|
||||
|
||||
|
||||
-- Enums and static methods of class marked as %nonspace should have backward compatible name
|
||||
assert(ns.NoNSpacePlease_noNspaceStaticFunc() == 10)
|
||||
-- assert(ns.NoNSpacePlease_NoNspace1 == 1)
|
||||
-- assert(ns.NoNSpacePlease.NoNspace2 == 10)
|
||||
|
||||
|
|
|
|||
|
|
@ -67,7 +67,11 @@ namespace Outer {
|
|||
const Outer::Inner2::Color& col2c) {}
|
||||
}; // Color
|
||||
int Color::staticMemberVariable = 0;
|
||||
class NoNSpacePlease {};
|
||||
class NoNSpacePlease {
|
||||
public:
|
||||
enum NoNSpaceEnum { NoNspace1 = 1, NoNspace2 = 10 };
|
||||
static int noNspaceStaticFunc() { return 10; }
|
||||
};
|
||||
} // Inner2
|
||||
|
||||
// Derived class
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue