Extract Interface

Hello,

First of all, kudos on the fixes in build 256! Resharper is, for me, the
most invaluable companion to Visual Studio 2005, hands down.

I wanted to inform you of what seems to be an error in the Extract
Interface refactoring. When I apply it to a generic class and methods
that have parameters of one of the types specified in the type parameter
list, these types are not correctly carried over to the interface,
resulting in compilation errors.

Eg:

public class MyClass { public void MyMethod(T object) { } } becomes: public interface MyInterface ]]> : MyInterface <- lacking type parameters
{
public void MyMethod(T object)
{
}
}

Hope this helps!

Filip Duyck.

1 comment
Comment actions Permalink

Hello Filip,

It's a bug indeed and there is a report in the tracker, but most probably
we won't fix it in bugfix updates to 2.0.

Oleg Stepanov
Software Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"

Hello,

First of all, kudos on the fixes in build 256! Resharper is, for me,
the most invaluable companion to Visual Studio 2005, hands down.

I wanted to inform you of what seems to be an error in the Extract
Interface refactoring. When I apply it to a generic class and methods
that have parameters of one of the types specified in the type
parameter list, these types are not correctly carried over to the
interface, resulting in compilation errors.

Eg:

public class MyClass<T>
{
public void MyMethod(T object)
{
}
}
becomes:

public interface MyInterface <- lacking type parameter
{
void MyMethod(T object);
}
public class MyClass<T> : MyInterface <- lacking type parameters
{
public void MyMethod(T object)
{
}
}
Hope this helps!

Filip Duyck.



0

Please sign in to leave a comment.