WiseTechGlobal / WTG.Analyzers

Analyzers from WiseTech Global to enforce our styles, behaviours, and prevent common mistakes.
Other
16 stars 3 forks source link

Boolean literal rule code-fixes to uncompilable code when nullable is involved #163

Closed yaakov-h closed 2 years ago

yaakov-h commented 2 years ago
var x = condition ? true : (bool?)null;

We probably shouldn't warn in this case as we can't fix this to condition || (bool?)null since you can't || into a nullable like that.