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
 Create Implementation from incorrect declaration
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

GKarRacer
Ketchup Master

USA
58 Posts

Posted - Aug 25 2011 :  1:13:35 PM  Show Profile  Reply with Quote
I'm not sure if this is bug or just an unintended side effect, but given the following incorrect code in a header file:

class test
{
void bad()
};

Notice the missing semicolon at the end of bad.

Highlight bad and select "Create Implementation". Normally what you'd expect is the definition for "bad" in the source file, which is what you get if the semicolon is properly there. Without the semicolon, instead you get this:

class test
{
void bad() test::bad() }
{

}


Clearly VAX is confused by the code above. Now since the class/function declaration is incorrect, I don't know if this is really a problem or not, but I thought you should know.

feline
Whole Tomato Software

United Kingdom
18952 Posts

Posted - Aug 25 2011 :  7:02:46 PM  Show Profile  Reply with Quote
Our parser does a good job of recovering from invalid code, since you often want VA to work on code that you are still writing. Unfortunately this is a good example of a code error that tends to trip us up.

In a way it is useful, when Refactoring starts doing really strange things, it is often a sign you have a missing semi colon.

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