Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot explicitly call default method in an interface on Android #102

Open
sriharshachilakapati opened this issue Jun 29, 2016 · 3 comments

Comments

@sriharshachilakapati
Copy link

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:

@Override
public void glDrawArrays(int primitive, int offset, int vertexCount)
{
    IGraphicsDevice.super.glDrawArrays(primitive, offset, vertexCount);
    GLES30.glDrawArrays(primitive, offset, vertexCount);
}

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.

@sriharshachilakapati
Copy link
Author

@orfjackal Sorry for pinging directly, but do you need any more information regarding this issue?

@luontola
Copy link
Owner

luontola commented Jul 2, 2016

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 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
@luontola
Copy link
Owner

The error message about CstInterfaceMethodRef and CstMethodRef sounds like it can be something similar to #119

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants