Resharper incorrect warning with LINQ and Nullable types

Resharper will incorrectly show a warning for a possible System.InvalidOperation exception in a LINQ statement with nullables.

An example of this would be

from @obj in allobjs
orderby @obj.Source
where @obj.Source.HasValue
group @obj by @obj.Source.Value
into grouped

It will warn that by @obj.Source.Value could produce a System.InvalidOperation which is not the case since the where conditions has limited the results to only those that HasValue.

2 comments
Comment actions Permalink

FYI this is still occuring as of 1653

0
Comment actions Permalink

And what about this issue, was it fixed already?
http://img168.imageshack.us/img168/1900/66904074.jpg

0

Please sign in to leave a comment.