Use ApiLevelException for Invoke Polymorphic error
Since this is a checked exception this needed to be propagated in a lot
of places (and some tweaking with lambdas) but hopefully it'll be the
only time.
Bug: 63692875
Change-Id: If4f366ae2881c1dca64141231c908b412f32ef59
diff --git a/src/main/java/com/android/tools/r8/graph/Code.java b/src/main/java/com/android/tools/r8/graph/Code.java
index 3845507..0ae2cbc 100644
--- a/src/main/java/com/android/tools/r8/graph/Code.java
+++ b/src/main/java/com/android/tools/r8/graph/Code.java
@@ -3,6 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
package com.android.tools.r8.graph;
+import com.android.tools.r8.ApiLevelException;
import com.android.tools.r8.dex.IndexedItemCollection;
import com.android.tools.r8.dex.MixedSectionCollection;
import com.android.tools.r8.errors.Unreachable;
@@ -13,7 +14,8 @@
public abstract class Code extends CachedHashValueDexItem {
- public abstract IRCode buildIR(DexEncodedMethod encodedMethod, InternalOptions options);
+ public abstract IRCode buildIR(DexEncodedMethod encodedMethod, InternalOptions options)
+ throws ApiLevelException;
public abstract void registerReachableDefinitions(UseRegistry registry);