mirror of
https://github.com/Eaglercraft-TeaVM-Fork/eagler-teavm.git
synced 2024-12-22 08:14:09 -08:00
Fix missing virtual call detector
This commit is contained in:
parent
d1fa57210e
commit
0eca9d95e1
|
@ -71,9 +71,16 @@ public interface TSpliterator<T> {
|
|||
}
|
||||
|
||||
interface OfInt extends OfPrimitive<Integer, IntConsumer, OfInt> {
|
||||
@Override
|
||||
boolean tryAdvance(IntConsumer consumer);
|
||||
|
||||
@Override
|
||||
default boolean tryAdvance(Consumer<? super Integer> action) {
|
||||
return tryAdvance((IntConsumer) action::accept);
|
||||
if (action instanceof IntConsumer) {
|
||||
return tryAdvance((IntConsumer) action);
|
||||
} else {
|
||||
return tryAdvance((IntConsumer) action::accept);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -82,9 +89,19 @@ public interface TSpliterator<T> {
|
|||
// continue
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
default void forEachRemaining(IntConsumer action) {
|
||||
while (tryAdvance(action)) {
|
||||
// continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface OfLong extends OfPrimitive<Long, LongConsumer, OfLong> {
|
||||
@Override
|
||||
boolean tryAdvance(LongConsumer consumer);
|
||||
|
||||
@Override
|
||||
default boolean tryAdvance(Consumer<? super Long> action) {
|
||||
return tryAdvance((LongConsumer) action::accept);
|
||||
|
@ -96,9 +113,19 @@ public interface TSpliterator<T> {
|
|||
// continue
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
default void forEachRemaining(LongConsumer action) {
|
||||
while (tryAdvance(action)) {
|
||||
// continue
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
interface OfDouble extends OfPrimitive<Double, DoubleConsumer, OfDouble> {
|
||||
@Override
|
||||
boolean tryAdvance(DoubleConsumer consumer);
|
||||
|
||||
@Override
|
||||
default boolean tryAdvance(Consumer<? super Double> action) {
|
||||
return tryAdvance((DoubleConsumer) action::accept);
|
||||
|
@ -110,5 +137,12 @@ public interface TSpliterator<T> {
|
|||
// continue
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
default void forEachRemaining(DoubleConsumer action) {
|
||||
while (tryAdvance(action)) {
|
||||
// continue
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -207,16 +207,12 @@ public class MissingItemsProcessor {
|
|||
if (!checkClass(location, method.getClassName())) {
|
||||
return false;
|
||||
}
|
||||
if (!reachableMethods.contains(method)) {
|
||||
return true;
|
||||
}
|
||||
|
||||
if (hierarchy.resolve(method) != null) {
|
||||
return true;
|
||||
}
|
||||
|
||||
diagnostics.error(new CallLocation(methodRef, location), "Method {{m0}} was not found",
|
||||
method);
|
||||
diagnostics.error(new CallLocation(methodRef, location), "Method {{m0}} was not found", method);
|
||||
emitExceptionThrow(location, NoSuchMethodError.class.getName(), "Method not found: " + method);
|
||||
return true;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user