You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have a default method in an interface, and I tried to call it explicitly from the same method in the implementing class and it is generating an exception:
This is the code that I'm having and it works fine under standard Java 8. But when doing the same code (back ported to Java 1.6 on android) generates the following error:
Uncaught translation error: com.android.dx.cf.code.SimException: com.android.dx.rop.cst.CstInterfaceMethodRef cannot be cast to com.android.dx.rop.cst.CstMethodRef
I'm using this with latest gradle-retrolambda and retrolambda. I'm not even using Progaurd, so I'm not sure why this is being caused. All the original default method does is that it increments a static variable from a final inner class of the same interface.
The text was updated successfully, but these errors were encountered:
It would help to have a SSCCE for reproducing it. I haven't yet had time to look into this issue, but that would help to make it faster to fix.
luontola
changed the title
Cannot explicitly call default method in an interface
Cannot explicitly call default method in an interface on Android
Jan 17, 2017
I have a default method in an interface, and I tried to call it explicitly from the same method in the implementing class and it is generating an exception:
This is the code that I'm having and it works fine under standard Java 8. But when doing the same code (back ported to Java 1.6 on android) generates the following error:
I'm using this with latest gradle-retrolambda and retrolambda. I'm not even using Progaurd, so I'm not sure why this is being caused. All the original default method does is that it increments a static variable from a final inner class of the same interface.
The text was updated successfully, but these errors were encountered: