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
 VA 2420: erroneous coloring of out variable
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Mar 15 2022 :  12:45:18 PM  Show Profile  Reply with Quote
For some reason, the "aux" var gets colored wrongly in this context. C#, Win7, VS2017.



feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Mar 18 2022 :  07:45:14 AM  Show Profile  Reply with Quote
Just checking I understand correctly, "aux" is being declared on the first line. This is what I am testing here, and not seeing any problems with the colouring of the variable declared inside the function call.

If you place the caret into "aux" on either line are you getting the correct information in VA's context and definition fields?

What about Alt-G on aux on the second line, where it is used? I am trying to tell if this is a colouring only problem, or if VA is really confused here.

zen is the art of being at one with the two'ness
Go to Top of Page

Uniwares
Tomato Guru

Portugal
2322 Posts

Posted - Mar 18 2022 :  08:11:59 AM  Show Profile  Reply with Quote
VA doesnt show anything on the definition field, but goes to the declaration, tooltip shows correct information. VA definitely IS confused here, subsequent uses of the variable continue to be colored wrongly.



Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Mar 18 2022 :  09:56:42 AM  Show Profile  Reply with Quote
With code based on yours, rather than my simple example to prove the syntax works, I am seeing the same problem. But in my simple "prove the syntax" example the variable is coloured correctly, both when passed in and used...

Trying to make sense of this now.

zen is the art of being at one with the two'ness
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Mar 18 2022 :  12:36:11 PM  Show Profile  Reply with Quote
I have a pattern. If you enter:

bool parsed;

on the line above, so "parsed" isn't being declared on the same line, "aux" should now be understood correctly as a new variable being declared.

case=147955

zen is the art of being at one with the two'ness
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