Merge commit '61443a924dda1f999d5a6b663228ebce6df717fb' into dev-release
diff --git a/src/main/java/com/android/tools/r8/shaking/Enqueuer.java b/src/main/java/com/android/tools/r8/shaking/Enqueuer.java
index 30a8723..213819d 100644
--- a/src/main/java/com/android/tools/r8/shaking/Enqueuer.java
+++ b/src/main/java/com/android/tools/r8/shaking/Enqueuer.java
@@ -2226,19 +2226,6 @@
       return;
     }
 
-    if (!clazz.isInterface()) {
-      throw appView
-          .reporter()
-          .fatalError(
-              "The class "
-                  + implementer
-                  + " implements the interface "
-                  + type
-                  + " but "
-                  + type
-                  + " is not an interface.");
-    }
-
     if (!appView.options().enableUnusedInterfaceRemoval
         || rootSet.noUnusedInterfaceRemoval.contains(type)
         || mode.isMainDexTracing()) {
@@ -2252,6 +2239,21 @@
       return;
     }
 
+    if (mode.isInitialTreeShaking()) {
+      if (!clazz.isInterface()) {
+        appView
+            .reporter()
+            .warning(
+                "The class "
+                    + implementer
+                    + " implements the interface "
+                    + type
+                    + " but "
+                    + type
+                    + " is not an interface.");
+      }
+    }
+
     // No need to mark the type as live. If an interface type is only reachable via the
     // inheritance clause of another type it can simply be removed from the inheritance clause.
     // The interface is needed if it has a live default interface method or field, though.
diff --git a/src/main/java/com/android/tools/r8/tracereferences/TraceReferencesCommand.java b/src/main/java/com/android/tools/r8/tracereferences/TraceReferencesCommand.java
index 1c98765..9aff1d0 100644
--- a/src/main/java/com/android/tools/r8/tracereferences/TraceReferencesCommand.java
+++ b/src/main/java/com/android/tools/r8/tracereferences/TraceReferencesCommand.java
@@ -114,6 +114,7 @@
     return printVersion;
   }
 
+  @Keep
   public static class Builder {
 
     private boolean printHelp = false;