Skip to content

Latest version (2.3.0) produces incorrect code sometimes #115

Closed
@sp-1234

Description

@sp-1234

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions