Change theme
Help
Press space for more information.
Show links for this issue (Shortcut: i, l)
Copy issue ID
Previous Issue (Shortcut: k)
Next Issue (Shortcut: j)
Sign in to use full features.
Vote: I am impacted
Notification menu
Refresh (Shortcut: Shift+r)
Go home (Shortcut: u)
Pending code changes (auto-populated)
[ID: 558956]
View issue level access limits(Press Alt + Right arrow for more information)
Attachment actions
Unintended behavior
View staffing
Description
AGP: 8.2.2 (also reproducible on 8.6.1)
R8: 8.2.47 (also reproducible on 8.7.14 and 8.8.7-dev), reproducible in both full and compat modes.
Kotlin: 1.9.23 (also reproducible on 2.0.0 and 2.0.20)
I encounter an issue with incorrect optimization of kotlin interface default method (with
jvm-default=all
compiler option) when classes that implement the interface have common base class. It's reproducible with java interface default method as well.Example:
Interface:
Interface caller:
First impl class (doesn't override default implementation from interface):
Second impl class (overrides default implementation from interface by calling method
finish()
available in common base class):Optimizer moves
foo()
method implementation fromSecondActivity
toandroidx.core.app.ComponentActivity
:but it doesn't add default implementation from
TestInterface
toFirstActivity
. This wayFirstActivity
will be incorrectly finished when the interface method is called.Test application to reproduce the issue is attached.