Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 BUG: Name resolution problems
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

guest
Junior Member

15 Posts

Posted - Oct 11 2010 :  11:16:13 AM  Show Profile  Reply with Quote
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:





accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 12 2010 :  03:48:41 AM  Show Profile  Reply with Quote
About "Muffin" resolves incorrectly: Yes, it's a little bit odd, but should not cause any problems in real-life, since you didn't use "using namespace". Normally it shouldn't have been recognized at all. Thank you for pointing this out, though. It may cause problems in other circumstances.

About the other problem: unfortunately, class named same as namespace confuses parser is a known problem:

case=1384

Edited by - accord on Oct 13 2010 03:36:08 AM
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000