This shows multiple issues with VA's name resolution. I could not make a simple test case for the second problem, but it seems to be an issue related to load order, and although it is fixed by reloading the project in this example, I have seen larger projects where reloading or rebuilding the databases does not work. Tested with build 1833.
Steps to reproduce:
1.) Create a new project with an empty source file
2.) Paste this at the top of the file:
namespace Foods
{
class Muffin
{
};
}
Muffin::T_1;
::Muffin::T_1;
You should now have something that looks like:
Notice the the first line referencing "Muffin" resolves incorrectly:
3.) Paste this either before or immediately after the Foods namespace:
namespace Muffin
{
enum
{
T_1,
T_2,
T_3,
T_4
};
}
The result is: