diff options
Diffstat (limited to 'sources/shiboken6/ApiExtractor')
-rw-r--r-- | sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp b/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp index a7f9bb93b..755af5ebc 100644 --- a/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp +++ b/sources/shiboken6/ApiExtractor/abstractmetabuilder.cpp @@ -3059,8 +3059,11 @@ AbstractMetaClassList AbstractMetaBuilderPrivate::classesTopologicalSorted(const } // Member fields need to be initialized for (const AbstractMetaField &field : clazz->fields()) { - addClassDependency(classList, field.type().typeEntry(), - clazz, &graph); + auto typeEntry = field.type().typeEntry(); + if (typeEntry->isEnum()) // Enum defined in class? + typeEntry = typeEntry->parent(); + if (typeEntry != nullptr) + addClassDependency(classList, typeEntry, clazz, &graph); } } |