diff --git a/Source/Engine/Tests/TestScripting.cpp b/Source/Engine/Tests/TestScripting.cpp index ae1c30a3c..cfeb24a38 100644 --- a/Source/Engine/Tests/TestScripting.cpp +++ b/Source/Engine/Tests/TestScripting.cpp @@ -7,6 +7,12 @@ #include "Engine/Scripting/ManagedCLR/MUtils.h" #include +Foo::Foo(const SpawnParams& params) + : ScriptingObject(params) + , FooInterface(nullptr) +{ +} + TestNesting::TestNesting(const SpawnParams& params) : SerializableScriptingObject(params) { diff --git a/Source/Engine/Tests/TestScripting.h b/Source/Engine/Tests/TestScripting.h index 5cd61cbc7..19fd76351 100644 --- a/Source/Engine/Tests/TestScripting.h +++ b/Source/Engine/Tests/TestScripting.h @@ -8,6 +8,21 @@ #include "Engine/Scripting/ScriptingObject.h" #include "Engine/Scripting/SerializableScriptingObject.h" +// Test interface (name conflict with namespace) +API_INTERFACE(Namespace="Foo") class FLAXENGINE_API IFoo +{ + DECLARE_SCRIPTING_TYPE_MINIMAL(IFoo); +}; + +// Test class (name conflict with namespace) +API_CLASS(Namespace="Foo") class FLAXENGINE_API Foo : public ScriptingObject +{ + DECLARE_SCRIPTING_TYPE(Foo); + + // Test field. + API_FIELD() IFoo* FooInterface; +}; + // Test compilation with nested types. API_CLASS() class TestNesting : public SerializableScriptingObject {