diff --git a/tests/apis/namespace/basic/test.lua b/tests/apis/namespace/basic/test.lua new file mode 100644 index 0000000000..83c0a95464 --- /dev/null +++ b/tests/apis/namespace/basic/test.lua @@ -0,0 +1,3 @@ +function main() + os.exec("xmake -vD") +end diff --git a/tests/apis/namespace/nested/test.lua b/tests/apis/namespace/nested/test.lua new file mode 100644 index 0000000000..83c0a95464 --- /dev/null +++ b/tests/apis/namespace/nested/test.lua @@ -0,0 +1,3 @@ +function main() + os.exec("xmake -vD") +end diff --git a/xmake/core/base/interpreter.lua b/xmake/core/base/interpreter.lua index 6445f9ad58..f6f9490479 100644 --- a/xmake/core/base/interpreter.lua +++ b/xmake/core/base/interpreter.lua @@ -954,6 +954,7 @@ function interpreter:api_register_scope(...) local scope_args = table.pack(...) local scope_name = scope_args[1] local scope_info = scope_args[2] + local namespace = self._NAMESPACE_STR -- check invalid scope name, @see https://github.com/xmake-io/xmake/issues/4547 if scope_args.n > 0 and type(scope_name) ~= "string" then