You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This code throws S1905 but when I make the recommended change the code fails to compile with CS0411. Is this a false positive?
using System;namespaceS1905_False_Positive{internalstaticclassClass{publicstaticvoidRunAction(Actionaction){
RunFunc(()=>{ action();returndefault;},(bool)default);}publicstatic T RunFunc<T>(Func<T>func,Treturnvalue=default){try{return func();}catch(Exception){returnreturnvalue;}}}}
Related information
SonarC# Version: Latest
Visual Studio Version : 15.9.7
The text was updated successfully, but these errors were encountered:
Evangelink
changed the title
S1905 False Positive
Update S1905: False Positive with defaultFeb 22, 2019
Evangelink
changed the title
Update S1905: False Positive with default
Update S1905: False Positive with 'default'
Feb 22, 2019
Description
This code throws S1905 but when I make the recommended change the code fails to compile with CS0411. Is this a false positive?
Related information
The text was updated successfully, but these errors were encountered: