Testcase:
1. enter the following code into your header file:
class CFoo {
public:
virtual CFoo* Copy(const CFoo& other) const;
};
class CFooBar : public CFoo {
public:
CFooBar();
virtual CFooBar* Copy(const CFoo& other) const;
CFooBar(const CFooBar& other);
};
2. enter the following code into your implementation file (don't forget to include the above header):
CFooBar* CFooBar::Copy(const CFoo& other) const
{
CFooBar* newfoobar(NULL);
newfoobar = new CFooBar(dynamic_cast<const CFooBar&>(other)); // comment this line out to see the change
return newfoobar;
}
3. Check syntax coloring for the symbol, CFooBar. What I'm seeing is sth like this:CFooBar* CFooBar::Copy(const CFoo& other) const
{
CFooBar* newfoobar(NULL);
newfoobar = new CFooBar(dynamic_cast<const CFooBar&>(other)); // comment this line out to see the change
return newfoobar;
}
Apparently, VA still recognizes the class when used as a namespace, but not when used as a typename, or constructor name!
4. comment out the second line of the Copy function and check again - coloring is back to normal.
This code compiles well enough. Still, as long as the code contains a dynamic_cast, coloring is messed up for me!
Moreover: go to the second line in Copy, change the constructor call to newfoobar = new CFooBar((dynamic_cast<const CFooBar&>(other)).|);
and see what kind of suggestions you get - I'm seeing CFoo::Copy(...) only, not the CFooBar functions.
P.S.: I noticed that removing the const qualifier within the dynamic_cast also fixes the coloring - apparently VAX has a problem with this qualifier inside a cast.
Version info:
VA_X.dll file version 10.3.1557.0 built 2007.05.29
Licensed to:
VA X: ...[snip]
VAOpsWin.dll version 1.3.2.2
VATE.dll version 1.0.5.6
DevEnv.exe version 7.10.3077.0
msenv.dll version 7.10.3077.0
Font: Courier New 13(Pixels)
Comctl32.dll version 5.82.2900.2982
Windows XP 5.1 Build 2600 Service Pack 2
2 processors
Platform: Win32
Stable Includes:
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\include;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\include;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include\\prerelease;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\PlatformSDK\\include;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\SDK\\v1.1\\include;
Library Includes:
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\mfc;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\atlmfc\\src\\atl;
C:\\Program Files\\Microsoft Visual Studio .NET 2003\\Vc7\\crt\\src;
Other Includes: