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,10 +71,17 @@ public interface TSpliterator<T> {
|
|||
}
|
||||
|
||||
interface OfInt extends OfPrimitive<Integer, IntConsumer, OfInt> {
|
||||
@Override
|
||||
boolean tryAdvance(IntConsumer consumer);
|
||||
|
||||
@Override
|
||||
default boolean tryAdvance(Consumer<? super Integer> action) {
|
||||
if (action instanceof IntConsumer) {
|
||||
return tryAdvance((IntConsumer) action);
|
||||
} else {
|
||||
return tryAdvance((IntConsumer) action::accept);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
default void forEachRemaining(Consumer<? super Integer> action) {
|
||||
|
@ -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