More bugs :-)

Hello,

While I was on the road last week I made a list of some of the more
annoying bugs that they happened to me. I hope I'm not posting dupes
here, alot of the problems have to do with generics.

  • Members of a partial class that were instantiated in another part of

the class are wrongfully marked as unresolvable symbols.

  • Options -> Code Style -> C# -> Spaces -> Other -> make "After comma"

come after "Before comma"

  • public event MyClass<..>.SomeEventHandler theEvent;

After reformatting:
public event MyClass.SomeEventHandler theEvent;

  • public void AddView(StartPanel view)

=> StartPanel is designable, automagically marked as "private" in
StartPanel.Designer.cs but as "public" in the StartPanel.cs file, yields
error about inconsistent accessibility because it thinks StartPanel is
private

  • private void OnEventBlabla(int index, Account value)

{
if (event1 != null)
event1(index, value);
}

public event MyClass.SomeEventHandler event1; =>]]> value is wrongfully marked as being unable to cast to 'T'

  • User user = new MyService<Note>(service, account).GetUserInfo();

=> MyService is an alias (using MyService = ...), MyService is a generic class => trying to use MyService]]> yields highlighting
error that MyService does not have type parameters

Kind regards,
Filip.

4 comments
Comment actions Permalink

Thnk you for the feedback.

  • Members of a partial class that were instantiated in another part of the

class are wrongfully marked as unresolvable symbols.


Please could you construct a small example and post it into our tracker?

  • Options -> Code Style -> C# -> Spaces -> Other -> make "After comma"

come after "Before comma"


Fixed in 204

  • public event MyClass<..>.SomeEventHandler theEvent;

After reformatting:
public event MyClass.SomeEventHandler theEvent;


Fixed in 204

  • public void AddView(StartPanel view)

=> StartPanel is designable, automagically marked as "private" in
StartPanel.Designer.cs but as "public" in the StartPanel.cs file, yields
error about inconsistent accessibility because it thinks StartPanel is
private


I do not see problem here.
Different parts of partial class couldn't be declared both public and
private.

  • private void OnEventBlabla(int index, Account value)

{
if (event1 != null)
event1(index, value);
}

>

public event MyClass<Account>.SomeEventHandler event1;
=> value is wrongfully marked as being unable to cast to 'T'


Fixed in 204

  • User user = new MyService<Note>(service, account).GetUserInfo();

=> MyService is an alias (using MyService = ...), MyService<T> is a
generic class => trying to use MyService<SomeClass> yields highlighting
error that MyService does not have type parameters


We will try to fix this shortly

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


0
Comment actions Permalink

Hello,

Eugene Pasynkov (JetBrains) wrote:
>>* Members of a partial class that were instantiated in another part of the
>>class are wrongfully marked as unresolvable symbols.
As for this bug, I suddently can't seem to reproduce this behavior
anymore. Perhaps it was the effect of something else going wrong, I will
keep an eye open for this in the future.

>>* public void AddView(StartPanel view)
>> => StartPanel is designable, automagically marked as "private" in
>>StartPanel.Designer.cs but as "public" in the StartPanel.cs file, yields
>>error about inconsistent accessibility because it thinks StartPanel is
>>private

I do not see problem here.
Different parts of partial class couldn't be declared both public and
private.

The thing is, the class definition is "public partial class StartPanel"
in StartPanel.cs, but "partial class StartPanel" in
StartPanel.Designer.cs. I'm thinking that Resharper thinks the class is
private (at least in the .Designer.cs file) since no modifiers were used
there?

Looking forward to 204 :)

Kind regards,
Filip.

0
Comment actions Permalink


>>>* Members of a partial class that were instantiated in another part of
>>>the class are wrongfully marked as unresolvable symbols.

As for this bug, I suddently can't seem to reproduce this behavior
anymore. Perhaps it was the effect of something else going wrong, I will
keep an eye open for this in the future.


Thank you

>>>* public void AddView(StartPanel view)
>>> => StartPanel is designable, automagically marked as "private" in
>>> StartPanel.Designer.cs but as "public" in the StartPanel.cs file, yields
>>> error about inconsistent accessibility because it thinks StartPanel is
>>> private
>> I do not see problem here.
>> Different parts of partial class couldn't be declared both public and
>> private.

The thing is, the class definition is "public partial class StartPanel" in
StartPanel.cs, but "partial class StartPanel" in StartPanel.Designer.cs.
I'm thinking that Resharper thinks the class is private (at least in the
.Designer.cs file) since no modifiers were used there?


No, such case is processed correctly by ReSharper

Looking forward to 204 :)


Sorry for misleading, but some of the reported problems will not be fixed in
204 build :( They will be fixed in 205

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


0
Comment actions Permalink

Hey,

Eugene Pasynkov (JetBrains) wrote:
>>>>* public void AddView(StartPanel view)
>>>> => StartPanel is designable, automagically marked as "private" in
>>>>StartPanel.Designer.cs but as "public" in the StartPanel.cs file, yields
>>>>error about inconsistent accessibility because it thinks StartPanel is
>>>>private
>>>I do not see problem here.
>>>Different parts of partial class couldn't be declared both public and
>>>private.
>>The thing is, the class definition is "public partial class StartPanel" in
>>StartPanel.cs, but "partial class StartPanel" in StartPanel.Designer.cs.
>>I'm thinking that Resharper thinks the class is private (at least in the
>>.Designer.cs file) since no modifiers were used there?

No, such case is processed correctly by ReSharper

Obviously it is not, as I am experiencing it :) the AddView method is a
method from another class, and StartPanel is being underlined with curly
red line, and a red mark in the error analysis on the right. I'm running
build 203 using VS2005.

Kind regards,
Filip.

0

Please sign in to leave a comment.