Skip to content

Commit

Permalink
Fix ExprArithmetic Set Construction (#6758)
Browse files Browse the repository at this point in the history
ExprArithmetic: change set construction
  • Loading branch information
APickledWalrus committed Jun 3, 2024
1 parent 159fd3c commit e95a35a
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@
import ch.njol.skript.util.LiteralUtils;
import ch.njol.skript.util.Patterns;
import ch.njol.util.Kleenean;
import com.google.common.collect.ImmutableSet;
import org.bukkit.event.Event;
import org.eclipse.jdt.annotation.Nullable;
import org.skriptlang.skript.lang.arithmetic.Arithmetics;
Expand All @@ -43,7 +44,6 @@

import java.lang.reflect.Array;
import java.util.ArrayList;
import java.util.Set;
import java.util.List;
import java.util.Collection;

Expand Down Expand Up @@ -258,7 +258,7 @@ public boolean init(Expression<?>[] exprs, int matchedPattern, Kleenean isDelaye
return error(firstClass, secondClass);
} else {
returnType = (Class<? extends T>) Classes.getSuperClassInfo(returnTypes).getC();
knownReturnTypes = Set.of(returnTypes);
knownReturnTypes = ImmutableSet.copyOf(returnTypes);
}
} else if (returnType == null) { // lookup
OperationInfo<L, R, T> operationInfo = (OperationInfo<L, R, T>) Arithmetics.lookupOperationInfo(operator, firstClass, secondClass);
Expand Down

0 comments on commit e95a35a

Please sign in to comment.