Fixed another assertion

This commit is contained in:
Matthias Koefferlein 2021-04-05 00:30:33 +02:00
parent 2c245af13a
commit 9b86ea96d2
1 changed files with 7 additions and 4 deletions

View File

@ -1077,10 +1077,13 @@ initialize_expressions ()
std::list<const gsi::ClassBase *> classes = gsi::ClassBase::classes_in_definition_order (); std::list<const gsi::ClassBase *> classes = gsi::ClassBase::classes_in_definition_order ();
for (std::list<const gsi::ClassBase *>::const_iterator c = classes.begin (); c != classes.end (); ++c) { for (std::list<const gsi::ClassBase *>::const_iterator c = classes.begin (); c != classes.end (); ++c) {
// we might encounter a child class which is a reference to a top-level class (e.g. if ((*c)->is_external ()) {
// duplication of enums into child classes). In this case we should create a reference inside the // skip external classes
// target class. continue;
if ((*c)->declaration () != *c) { } else if ((*c)->declaration () != *c) {
// we might encounter a child class which is a reference to a top-level class (e.g.
// duplication of enums into child classes). In this case we should create a reference inside the
// target class.
tl_assert ((*c)->parent () != 0); // top-level classes should be merged tl_assert ((*c)->parent () != 0); // top-level classes should be merged
// TODO: implement (see rba.cc:1544 for example) // TODO: implement (see rba.cc:1544 for example)
continue; continue;