Feature Request P2
Status Update
Comments
em...@google.com <em...@google.com> #2
The reason this has not been seen before now is that JDK-8272564 was done for JDK-18 and that it also require min API level 28. The reason the Espresso library expose this is that (most likely) internal Google build tools have JDK-8272564 applied generating invoke-interface
on Object
methods.
em...@google.com <em...@google.com>
ap...@google.com <ap...@google.com> #3
Project: r8
Branch: main
commit 6041b16a28b5966e6975340c03261c4fef61b794
Author: Søren Gjesse <sgjesse@google.com>
Date: Thu Mar 02 14:39:27 2023
Also apply the rewriting for JDK-8272564 up to Andorid R
Fixes: b/271408544
Change-Id: I240de7d301677668b9c13b3b49c7b7951e6434b6
M src/main/java/com/android/tools/r8/utils/InternalOptions.java
https://r8-review.googlesource.com/76861
Branch: main
commit 6041b16a28b5966e6975340c03261c4fef61b794
Author: Søren Gjesse <sgjesse@google.com>
Date: Thu Mar 02 14:39:27 2023
Also apply the rewriting for JDK-8272564 up to Andorid R
Fixes:
Change-Id: I240de7d301677668b9c13b3b49c7b7951e6434b6
M src/main/java/com/android/tools/r8/utils/InternalOptions.java
ap...@google.com <ap...@google.com> #4
Project: r8
Branch: main
commit 9e5692c8ce91b3ea3f4199740b41d57c097c9947
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri Mar 03 08:40:44 2023
Fix test after changing API level for rewriting of JDK-8272564
Bug: b/271408544
Change-Id: I67552a7fb13657ac9b4fb706592754d74d1b0653
M src/test/java/com/android/tools/r8/desugar/jdk8272564/Jdk8272564Test.java
https://r8-review.googlesource.com/76885
Branch: main
commit 9e5692c8ce91b3ea3f4199740b41d57c097c9947
Author: Søren Gjesse <sgjesse@google.com>
Date: Fri Mar 03 08:40:44 2023
Fix test after changing API level for rewriting of JDK-8272564
Bug:
Change-Id: I67552a7fb13657ac9b4fb706592754d74d1b0653
M src/test/java/com/android/tools/r8/desugar/jdk8272564/Jdk8272564Test.java
Description
Sealed classes and interfaces cannot be extended directly outside their module. Intuitively this implies they are effectively final, and therefore otherwise incompatible changes would be allowed, such as adding a new abstract method.
Unfortunately, it's possible to extend a sealed class with an abstract class as below and inadvertently expose a new abstract method (
funFromSealed()
in the example below). We should figure out how we want to model this behavior in Metalava, figure out if there's any other considerations to sealed classes, and then maybe updateClassItem.isEffectivelyFinal()
to match.