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

fix: Make lambda type implicit to avoid auto-importing type targeted in lambda #4093

Conversation

slarse
Copy link
Collaborator

@slarse slarse commented Aug 12, 2021

Fix #4079

See #4079 for a description of the problem.

@monperrus
Copy link
Collaborator

Clean and green, LGTM.

@slarse slarse changed the title wip: fix: Avoid auto-importing functional interface targeted in lambda review: fix: Avoid auto-importing functional interface targeted in lambda Aug 17, 2021
@slarse
Copy link
Collaborator Author

slarse commented Aug 17, 2021

@monperrus let's merge then, seems like a reasonable enough solution. I've double-checked and there's no way to explicitly specify return type of a lambda expression (which makes sense as lambdas can only target functional interfaces, where the type is already known).

@slarse slarse changed the title review: fix: Avoid auto-importing functional interface targeted in lambda review: fix: Make lambda type implicit to avoid auto-importing type targeted in lambda Aug 17, 2021
@monperrus monperrus changed the title review: fix: Make lambda type implicit to avoid auto-importing type targeted in lambda fix: Make lambda type implicit to avoid auto-importing type targeted in lambda Aug 17, 2021
@monperrus monperrus merged commit 8dd7000 into INRIA:master Aug 17, 2021
@monperrus
Copy link
Collaborator

Thanks for the fix @slarse

@slarse slarse deleted the issue/4079-avoid-auto-importing-functional-interface branch August 17, 2021 07:44
@monperrus monperrus mentioned this pull request Aug 19, 2021
woutersmeenk pushed a commit to woutersmeenk/spoon that referenced this pull request Aug 29, 2021
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

Successfully merging this pull request may close these issues.

Functional interfaces targeted in lambdas are imported when using auto-import printer
2 participants