| Index: tools/json_schema_compiler/cpp_type_generator.py
|
| diff --git a/tools/json_schema_compiler/cpp_type_generator.py b/tools/json_schema_compiler/cpp_type_generator.py
|
| index 34f3f16c51f3086427a49eccab94f7ce8de5350c..793ae136df301bb85e048ba16c9d3ffa238cd6f3 100644
|
| --- a/tools/json_schema_compiler/cpp_type_generator.py
|
| +++ b/tools/json_schema_compiler/cpp_type_generator.py
|
| @@ -26,6 +26,9 @@ class CppTypeGenerator(object):
|
| beneath the root namespace.
|
| """
|
| for type_ in namespace.types:
|
| + if self._type_namespaces.get(type_, namespace) != namespace:
|
| + raise ValueError('Type %s is declared in both %s and %s' %
|
| + (type_, namespace.name, self._type_namespaces[type_].name))
|
| self._type_namespaces[type_] = namespace
|
| self._cpp_namespaces[namespace] = cpp_namespace
|
|
|
|
|