Skip to content

Latest version (2.3.0) produces incorrect code sometimes #115

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

Closed
sp-1234 opened this issue Oct 11, 2016 · 3 comments
Closed

Latest version (2.3.0) produces incorrect code sometimes #115

sp-1234 opened this issue Oct 11, 2016 · 3 comments

Comments

@sp-1234
Copy link

sp-1234 commented Oct 11, 2016

I cannot share the full code, but it seems there's a regression over 2.1.0 that causes it to produce incorrect code.

The error is like this:

I set a click listener like this
view.findViewById(R.id.saveButton).setOnClickListener( v -> onSaveClick());
and the onSaveClick is called when I click some other view. (looks like generated classes are somehow mixed up…)

If I replace this lambda with "good&old" anonymous class, then it works correctly.
It also works correctly with retrolambda 2.1.0.

In all of these cases, I'm compiling via this gradle plugin https://github.com/evant/gradle-retrolambda

$ ./gradlew --version

------------------------------------------------------------
Gradle 3.1
------------------------------------------------------------

Build time:   2016-09-19 10:53:53 UTC
Revision:     13f38ba699afd86d7cdc4ed8fd7dd3960c0b1f97

Groovy:       2.4.7
Ant:          Apache Ant(TM) version 1.9.6 compiled on June 29 2015
JVM:          1.8.0_102 (Oracle Corporation 25.102-b14)
OS:           Mac OS X 10.11.6 x86_64
@kenyee
Copy link

kenyee commented Nov 15, 2016

Also had to back down to 3.2.1 of the retrolambda plugin for the same reason...wonky behavior :-P

@sp-1234
Copy link
Author

sp-1234 commented Jan 17, 2017

I see that it got 8 upvotes and it's been 3 months. Would be interesting to hear @orfjackal shed some light about it.
Also is it related/dupe of #109 ?

@luontola
Copy link
Owner

Sounds like a dupe of #109. I'll release a new version with a fix to it on Friday.

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

No branches or pull requests

3 participants