Skip to content

Fix false-positive on NestedScopeFunctions#5274

Merged
BraisGabin merged 3 commits into
mainfrom
fix-5264
Sep 4, 2022
Merged

Fix false-positive on NestedScopeFunctions#5274
BraisGabin merged 3 commits into
mainfrom
fix-5264

Conversation

@BraisGabin
Copy link
Copy Markdown
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