T O P I C R E V I E W |
kmw |
Posted - Sep 16 2008 : 9:02:05 PM This example shows that a method name that matches an identifier name is colored as a local-to-file identifier instead of a method:
class A { int foo( int bar ); int bar() { return 3; } };
the method bar() is colored not as a method, but as a variable.
Versions: VA X trial demo ( version 10.4.1647.0 built 2008.07.30 ) running inside Microsoft Visual C++ Version 2005
|
4 L A T E S T R E P L I E S (Newest First) |
kmw |
Posted - Sep 22 2008 : 5:11:09 PM I can do that in the new code that I write but not in existing code of others. |
feline |
Posted - Sep 22 2008 : 10:24:01 AM I have put in a bug report for this, but it is unlikely to be fixed quickly, since this is a hard problem for VA to solve correctly:
case=19889
For now have you considered renaming some of these "overlapping" parameters? |
kmw |
Posted - Sep 17 2008 : 7:10:53 PM > Do you have a lot of cases like this in your code?
There are enough cases so that it is distracting and confusing at times. I love it when it works but it really "takes me out of the zone" when it's wrong. |
feline |
Posted - Sep 17 2008 : 6:56:12 PM To a degree this is a known problem. The basic problem is that our colouring code has to run very quickly, to keep up with scrolling through the code, and it also has to work behind the IDE's back, so we do not have full control of the display.
So it is possible to confuse our colouring code, using the same name for different things in the same file is a good way to do this.
Do you have a lot of cases like this in your code? |