Incorrect error reporting

Hello,

I have a generic class in which I get several warnings from Resharper
2.0 (VS8) about 2 topics:

  • My class implements a series of interfaces, for example

Sys.Coll.Generic.ICollection. When implementing methods from this class
and defining them as virtual methods ('private virtual void Add(..)'), I
get a warning that my return type is wrong and that it should be, in
this case, 'void'. I'm guessing it's complaining about the return type
being 'virtual void' instead of 'void' ?

  • Still in the same generic class, I have a method that expects a T[]

parameter. Whenever I call that method with a T[] parameter, it gives me
an error about not being able to assign a T[] variable to a T[,,,]
parameter. I'm getting this error on normal generic classes from the
.NET framework, eg. List]]>'s ToArray() function creates objects of
which Resharper thinks the type is int[,,,].

Kind regards,
Filip.

1 comment
Comment actions Permalink

Thank you for the report

  • My class implements a series of interfaces, for example

Sys.Coll.Generic.ICollection. When implementing methods from this class
and defining them as virtual methods ('private virtual void Add(..)'), I
get a warning that my return type is wrong and that it should be, in this
case, 'void'. I'm guessing it's complaining about the return type being
'virtual void' instead of 'void' ?


I will investigate this

>

  • Still in the same generic class, I have a method that expects a T[]

parameter. Whenever I call that method with a T[] parameter, it gives me
an error about not being able to assign a T[] variable to a T[,,,]
parameter. I'm getting this error on normal generic classes from the .NET
framework, eg. List<int>'s ToArray() function creates objects of which
Resharper thinks the type is int[,,,].


This is a known problem and will be fixed in build 203

--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"


0

Please sign in to leave a comment.