icsharpcode / NRefactory

NRefactory - Refactoring Your C# Code
684 stars 263 forks source link

ConvertConditionalTernaryToNullCoalescingIssue bug #451

Closed DavidKarlas closed 9 years ago

DavidKarlas commented 9 years ago

It's interesting that Roslyn already processed preview and underlined wrong code. image

propVar.Value is object type and error is: "CS0019 Operator '??' cannot be applied to operands of type 'T' and 'T'"

Rpinski commented 9 years ago

Yep, ConvertConditionalTernaryToNullCoalescingIssue doesn't check whether T supports null.