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

SA1130: Handle optional named arguments correctly #3289

Merged
merged 9 commits into from
Oct 18, 2021
Merged

SA1130: Handle optional named arguments correctly #3289

merged 9 commits into from
Oct 18, 2021

Conversation

wdolek
Copy link
Contributor

@wdolek wdolek commented Jan 6, 2021

Fixes #3279, NullReferenceException is thrown when delegate is used as (optional) named parameter and argument index doesn't match method signature.

Fix is handling special case when argument is used with name, e.g. F(argName: delegate { ... }), otherwise everything works as before.

@codecov
Copy link

codecov bot commented Jan 6, 2021

Codecov Report

Merging #3289 (7303762) into master (a559b3e) will increase coverage by 0.00%.
The diff coverage is 98.82%.

❗ Current head 7303762 differs from pull request most recent head 64a563c. Consider uploading reports for the commit 64a563c to get more accurate results

@@           Coverage Diff           @@
##           master    #3289   +/-   ##
=======================================
  Coverage   93.45%   93.45%           
=======================================
  Files        1029     1029           
  Lines      111170   111253   +83     
  Branches     3940     3944    +4     
=======================================
+ Hits       103891   103973   +82     
- Misses       6263     6264    +1     
  Partials     1016     1016           

@wdolek
Copy link
Contributor Author

wdolek commented Oct 18, 2021

@sharwell is there anything else I can/should do with this MR?

@sharwell sharwell merged commit 90287c6 into DotNetAnalyzers:master Oct 18, 2021
@sharwell sharwell added this to the 1.2-beta.next milestone Oct 18, 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.

SA1130UseLambdaSyntax throws NullReferenceException
2 participants