Skip to content

Commit

Permalink
Type#GetLoadDependencies(): VERIFY() that only config object types ar…
Browse files Browse the repository at this point in the history
…e returned
  • Loading branch information
Al2Klimov committed Sep 20, 2024
1 parent c24713a commit b8396a6
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tools/mkclass/classcompiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -391,6 +391,11 @@ void ClassCompiler::HandleClass(const Klass& klass, const ClassDebugInfo&)
for (auto& dep : klass.LoadDependencies)
m_Impl << "\t\tVERIFY(type" << dep << ");" << std::endl;

m_Impl << std::endl;

for (auto& dep : klass.LoadDependencies)
m_Impl << "\t\tVERIFY(ConfigObject::TypeInstance->IsAssignableFrom(type" << dep << "));" << std::endl;

m_Impl << std::endl
<< "\t\treturn std::unordered_set<Type*>{";

Expand Down Expand Up @@ -1480,6 +1485,7 @@ void ClassCompiler::CompileStream(const std::string& path, std::istream& input,
<< "#include \"base/dependencygraph.hpp\"" << std::endl
<< "#include \"base/logger.hpp\"" << std::endl
<< "#include \"base/function.hpp\"" << std::endl
<< "#include \"base/configobject.hpp\"" << std::endl
<< "#include \"base/configtype.hpp\"" << std::endl
<< "#ifdef _MSC_VER" << std::endl
<< "#pragma warning( push )" << std::endl
Expand Down

0 comments on commit b8396a6

Please sign in to comment.