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
 1530: Variable Scope Bug
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

gmx
New Member

2 Posts

Posted - Jul 10 2006 :  04:28:01 AM  Show Profile  Reply with Quote
For example:

typedef struct tagTestStruct1
{
	int data1;
	int data2;
} TestStruct1;

typedef struct tagTestStruct2
{
	int data3;
	int data4;
} TestStruct2;

void test(void)
{
	int data;
	list<TestStruct1> test1;
	list<TestStruct2> test2;

	for(list<TestStruct1>::iterator it=test1.begin();it!=test1.end();it++)
	{
		data=it->data1;
	}

	for(list<TestStruct2>::iterator it=test2.begin();it!=test2.end();it++)
	{
		data=it->data3;//Wrong member hint and can't identify "data3" declaration
	}
}


The second "it" is identified with the first one.

support
Whole Tomato Software

5566 Posts

Posted - Jul 10 2006 :  11:48:12 AM  Show Profile  Reply with Quote
Unfortunately, the behavior is by design. See the caveat in the paragraph about Duplicate Context at:

http://www.wholetomato.com/products/features/context.html?more=yes

VA X can't use the typical scheme of distinguising symbols, i.e. file offsets, employed by parsers of static code. VA X is forced to use a scheme that allows definitions to move while you edit. You just bumped into the downside.
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