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>} */
|
/** @type {Set<JavaType>} */
|
||||||
done: new Set(),
|
done: new Set(),
|
||||||
};
|
};
|
||||||
|
let object = null;
|
||||||
for (let type; type = types.list.shift(); ) {
|
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)) {
|
if (types.done.has(type)) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -373,6 +379,9 @@ function getTypeInheritanceList(type) {
|
|||||||
if (type instanceof CEIType)
|
if (type instanceof CEIType)
|
||||||
types.list.push(...type.supers);
|
types.list.push(...type.supers);
|
||||||
}
|
}
|
||||||
|
if (object) {
|
||||||
|
types.done.add(object);
|
||||||
|
}
|
||||||
return Array.from(types.done);
|
return Array.from(types.done);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user