Author |
Topic |
|
Damir
Senior Member
Canada
34 Posts |
Posted - Aug 18 2009 : 1:25:12 PM
|
Here's the bug that's been present for a while.
I am using latest build 1727. VS 2008. Advanced -> Fonts and Colors -> Local symbols in Bold is On.
If you declare a variable within a scope of some function, it is correctly displayed in bold. If you add an instance of a class that has a member variable with the same name, it will then also be displayed in bold (wrong).
Consider the following C++ snippet:
void SomeClass::some_function () { int some_var;
CMyDialog dlg; dlg.some_member_var = 5; // nice light gray color dlg.some_var = some_var; // dlg.some_var is in bold!
//... etc }
Thanks
|
|
accord
Whole Tomato Software
United Kingdom
3287 Posts |
Posted - Aug 18 2009 : 3:37:20 PM
|
I am seeing the same effect here. Thank you for the clear description.
case=10071 |
|
|
Damir
Senior Member
Canada
34 Posts |
Posted - Jun 23 2011 : 10:43:48 AM
|
Any chance this will be fixed? Here are couple more examples of this bug in C++ VS2010, VA X 10.6.1850
Below is CMyClass in Hello.h file. Suppose we have a member function that takes a variable named the same as one of the member variables. Good practice issues aside, the member variable is now highlighted in bold.
And here's Hello.cpp file. All occurrences of 'special_var variable are now always highlighted in bold because of the 'some_function' presence with its similar name parameter.
Here's a second variation of this Hello.cpp file. Now we've addeda local definition of class at the very top and gave one of its variables the same name as the variable in CMyClass declared in hello.h. As you can see, first problem is that all variables of CLocalClass are in bold, and second problem is that CMyClass variables with the same name are also in bold now.
Regards, Damir
|
|
|
feline
Whole Tomato Software
United Kingdom
19024 Posts |
Posted - Jun 23 2011 : 4:36:18 PM
|
This is still in our list of bugs to fix, but unfortunately it is not an easy fix. VA's colouring code has to run very quickly to keep up with scrolling and typing, and we also have to work behind the IDE, without its knowledge, which complicates matters. So duplicate symbols can confuse the colouring code since it is hard to tell which one is which while colouring. |
zen is the art of being at one with the two'ness |
|
|
Damir
Senior Member
Canada
34 Posts |
Posted - Jun 23 2011 : 5:38:39 PM
|
Thanks for he update |
|
|
|
Topic |
|