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 false-positive on NestedScopeFunctions #5274

Merged
merged 3 commits into from Sep 4, 2022
Merged

Fix false-positive on NestedScopeFunctions #5274

merged 3 commits into from Sep 4, 2022

Conversation

BraisGabin
Copy link
Member

I can't find a way to unit test this. The issue was related with KtCallExpression.getResolvedCall(bindingContext) returning null. The logic there was returning an emptyList() and then a !list.any{} make the code really difficult to understand.

Now, if the KtCallExpression.getResolvedCall(bindingContext) returns null we assume that it's not a scoped function so all works as desired.

Fix #5264

@BraisGabin BraisGabin added this to the 1.22.0 milestone Sep 4, 2022
@BraisGabin BraisGabin merged commit 37584c2 into main Sep 4, 2022
@BraisGabin BraisGabin deleted the fix-5264 branch September 4, 2022 21:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

NestedScopeFunctions generates many false positives when custom functions are configured
2 participants