[262] R# breaks code on format
Hi,
I have some cases where 'reformat code' with all checkboxes ticked,
causes R# to break code.
It is caused when a static method is called on a class, where the class
has the same name as a property.
in this case:
public class MyPage : System.Web.UI.Page
{
void Method(string message)
{
System.Diagnostics.Trace.WriteLine(message);
}
}
is reformatted to this:
using System.Diagnostics;
using System.Web.UI;
public class MyPage : System.Web.UI.Page
{
private void Method(string message)
{
Trace.WriteLine(message);
}
}
but since "Trace" is also an inherited property from "Page" this line
doesn't compile:
Trace.WriteLine(message);
Best Regards,
Wiebe Tijsma
Please sign in to leave a comment.
I cannot reproduce this issue.
At my side, after re-formatting the file is:
using System.Web.UI;
public class MyPage : Page
{
private void Method(string message)
{
System.Diagnostics.Trace.WriteLine(message);
}
}
--
Eugene Pasynkov
Developer
JetBrains, Inc
http://www.jetbrains.com
"Develop with pleasure!"
"Wiebe Tijsma" <wiebeREMOVE@CAPITALStijsma.com> wrote in message
news:eetm84$7eh$1@is.intellij.net...
>
>
>
>
>
>
>
>
>
>
>
>
>
>
Eugene Pasynkov (JetBrains) wrote:
Sorry, I assumed this would be the case, I'll see if I can reproduce it
in a smaller solution...