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

bug: Lambda parameter references are not equal #1159

Closed
pvojtechovsky opened this issue Feb 1, 2017 · 0 comments
Closed

bug: Lambda parameter references are not equal #1159

pvojtechovsky opened this issue Feb 1, 2017 · 0 comments
Labels

Comments

@pvojtechovsky
Copy link
Collaborator

The code:

Consumer<Integer> c = (field)->{
	field=1;
};

contains CtParameter field in Lambda Expression and CtParameterReference in body of lambda expression. If I try to check whether these parameter references are equal then they are not

CtParameter<?> param = (CtParameter<?>)lambda.getParameters().get(0);
CtParameterReference paramRef = lambda.filterChildren(new TypeFilter<>(CtParameterReference.class)).first();
//it fails here
assertTrue(param.getReference().equals(paramRef));

See failing test here pvojtechovsky@b2f7716

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

No branches or pull requests

2 participants