mirror of
https://github.com/adelphes/android-dev-ext.git
synced 2025-12-22 17:39:19 +00:00
ensure Object is always last in the list of inherited types
This commit is contained in:
@@ -365,7 +365,13 @@ function getTypeInheritanceList(type) {
|
||||
/** @type {Set<JavaType>} */
|
||||
done: new Set(),
|
||||
};
|
||||
let object = null;
|
||||
for (let type; type = types.list.shift(); ) {
|
||||
// always add Object last
|
||||
if (type.rawTypeSignature === 'Ljava/lang/Object;') {
|
||||
object = type;
|
||||
continue;
|
||||
}
|
||||
if (types.done.has(type)) {
|
||||
continue;
|
||||
}
|
||||
@@ -373,6 +379,9 @@ function getTypeInheritanceList(type) {
|
||||
if (type instanceof CEIType)
|
||||
types.list.push(...type.supers);
|
||||
}
|
||||
if (object) {
|
||||
types.done.add(object);
|
||||
}
|
||||
return Array.from(types.done);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user