Skip to content

Commit

Permalink
Exception case for <clinit> being non-public interface method
Browse files Browse the repository at this point in the history
  • Loading branch information
Col-E committed Apr 23, 2023
1 parent bf23ec9 commit 98c2c23
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main/java/com/android/tools/r8/dex/FileWriter.java
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ private void checkInterfaceMethod(DexProgramClass holder, DexEncodedMethod metho
holder.getOrigin(), MethodPosition.create(method)));
}

if (!method.accessFlags.isPublic()) {
if (!method.accessFlags.isPublic() && !method.getName().toString().equals("<clinit>")) {
throw new CompilationError(
"Interface methods must not be "
+ "protected or package private: "
Expand Down

0 comments on commit 98c2c23

Please sign in to comment.