Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Create Implementation from incorrect declaration

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
GKarRacer Posted - Aug 25 2011 : 1:13:35 PM
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.
1   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Aug 25 2011 : 7:02:46 PM
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.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000