mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 16:14:10 -08:00
Fix bug in EnumSet.of
This commit is contained in:
parent
8256302c03
commit
7b989a4c1c
|
@ -113,6 +113,7 @@ public abstract class TEnumSet<E extends Enum<E>> extends AbstractSet<E> impleme
|
||||||
@SafeVarargs
|
@SafeVarargs
|
||||||
public static <E extends Enum<E>> TEnumSet<E> of(E first, E... rest) {
|
public static <E extends Enum<E>> TEnumSet<E> of(E first, E... rest) {
|
||||||
TEnumSet<E> result = TEnumSet.noneOf(first.getDeclaringClass());
|
TEnumSet<E> result = TEnumSet.noneOf(first.getDeclaringClass());
|
||||||
|
result.fastAdd(first);
|
||||||
for (E e : rest) {
|
for (E e : rest) {
|
||||||
result.fastAdd(e);
|
result.fastAdd(e);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user