False errors for nullable types

I am using the latest EAP build of Resharper and I really like the new
features you have included!

I discovered that Resharper shows errors for the following code with
nullable types that is compiled correctly with the VS2005 comiler:

int? a = null;
if (a == null) {}

Resharper says: "Cannot apply operator '==' to operands of type 'int?'
and 'null'".

A similar false error shows up for this code:

enum Enum { e1,e2 }
Enum? a = null;
if (a == Enum.e1) { }

Best regards,
Andreas Hofer

1 comment
Comment actions Permalink

Currently, there are a lot of problems with nullable types.
We are aware of them, and working hard to fix all these issues

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Andreas Hofer" <ejp10@gmx.ch> wrote in message
news:dohiju$n6p$1@is.intellij.net...
>I am using the latest EAP build of Resharper and I really like the new
>features you have included!
>

I discovered that Resharper shows errors for the following code with
nullable types that is compiled correctly with the VS2005 comiler:

>

int? a = null;
if (a == null) {}

>

Resharper says: "Cannot apply operator '==' to operands of type 'int?' and
'null'".

>

A similar false error shows up for this code:

>

enum Enum { e1,e2 }
Enum? a = null;
if (a == Enum.e1) { }

>

Best regards,
Andreas Hofer



0

Please sign in to leave a comment.