command-line-api icon indicating copy to clipboard operation
command-line-api copied to clipboard

Handle left Token being null in == and !=.

Open andrewimcclement opened this issue 3 years ago • 1 comments

Fixes #1797. This seems the simplest change to get things working correctly.

Marking as sealed is important to avoid potential complications with derived classes.

Personally I find it fairly natural to have == and != defined for something implementing IEquatable<T> - it provides a natural way to check for equality including nulls.

andrewimcclement avatar Jul 19 '22 16:07 andrewimcclement

Thanks, @andrewimcclement. The bug was fixed elsewhere. Sealing Token is a reasonable thing to do. If you'd like to resubmit that change, I'd be happy to merge it.

jonsequitur avatar Oct 17 '22 16:10 jonsequitur