mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Fix Enum.getDeclaringClass
This commit is contained in:
parent
f61567dfde
commit
a22eb43bde
|
@ -57,7 +57,8 @@ public abstract class TEnum<E extends TEnum<E>> extends TObject implements TComp
|
|||
|
||||
@SuppressWarnings("unchecked")
|
||||
public final TClass<E> getDeclaringClass() {
|
||||
return (TClass<E>) (Object) getClass();
|
||||
Class<E> result = (Class<E>) getClass();
|
||||
return (TClass<E>) (Object) (result.getSuperclass().equals(Enum.class) ? result : result.getSuperclass());
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
Loading…
Reference in New Issue
Block a user