This is a migrated thread and some comments may be shown as answers.

"Cast not required" warning

3 Answers 59 Views
General Discussions
This is a migrated thread and some comments may be shown as answers.
This question is locked. New answers and comments are not allowed.
Kias
Top achievements
Rank 1
Kias asked on 16 Mar 2011, 04:35 AM
Just noticed an odd behaviour with JustCode.

I was looking through my warnings in the JustCode Errors pane and noticed the error: "C#: This cast is not required". I then went to the code and noticed that it was an enum declaration and hence there was no casting going on... See attached. My assumption is that it's got a problem with how Enums handle casting internally but even if it's not the case it's definitely a bug.

I am posting this error here because for some reason I am unable to use Issue Tracker to log this bug (assumption: haven't got a support licence). Not sure that it's worth the effort to report bugs via a forum...

If there is somewhere to report the bug please let me know.

Cheers

3 Answers, 1 is accepted

Sort by
0
Kias
Top achievements
Rank 1
answered on 16 Mar 2011, 04:59 AM

Just another related issue

If you have something like

public enum MyEnum { Value1, Value2, Value3 }

If you right click on, say, Value2 and then click on "Go To Definition" then it will take you to the first usage of that value.
0
Svetlozar
Telerik team
answered on 16 Mar 2011, 11:04 AM
Hello Kias,

Thank you for your feedback.

The redundant cast warning for enum members is a bug that is already fixed. The fix will be included in the official release that will be released later today. Sorry for the inconvenience.

The second issue is actually a feature. If you are on a declaration Go To Definition does Find Extended Usages. Note that we have an option "Go to usages: navigate directly to single result". You can find it in JustCode Options | Navigation | General, so if this is checked and you have a single usage this behaviour is expected.

If you have any other problems or suggestions, please don't hesitate to write back.

All the best,
Svetlozar Angelov
the Telerik team
Registration for Q1 2011 What’s New Webinar Week is now open. Mark your calendar for the week starting March 21st and book your seat for a walk through all the exciting stuff we ship with the new release!
0
Kias
Top achievements
Rank 1
answered on 16 Mar 2011, 11:32 PM
Okay thank you
Tags
General Discussions
Asked by
Kias
Top achievements
Rank 1
Answers by
Kias
Top achievements
Rank 1
Svetlozar
Telerik team
Share this question
or