ReSharper and System.Enum problem

Hi,

ReSharper has some problems with the following code:

It says:
Cannot convert source type 'null' to target type 'System.Enum'
and
Cannot apply operator '==' to operands of type 'Enum' and 'null'

Code compiles and works fine, but you can't get rid of the orange marker in the marker bar. ('must' be green everywhere :( )

Thanks
Norbert

1 comment
Comment actions Permalink

There are internal problems with detecting such situations in ReSharper 1.5
This behavour is fixed according to C# standarts in the ReSharper 2.0

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Norbert Klein" <no_mail@jetbrains.com> wrote in message
news:19897132.1117725640564.JavaMail.javamailuser@localhost...

Hi,

>

ReSharper has some problems with the following code:

>

 {
> InProgress,
> Released,
> }
> private System.Enum dummy = null;
> private void Dummy()
> {
> if (dummy == null)
> {
>  dummy = UlrStateEnum.Released;
> }
> }]]>

It says:
Cannot convert source type 'null' to target type 'System.Enum'
and
Cannot apply operator '==' to operands of type 'Enum' and 'null'

>

Code compiles and works fine, but you can't get rid of the orange marker
in the marker bar. ('must' be green everywhere :( )

>

Thanks
Norbert



0

Please sign in to leave a comment.