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
 VAX misses class defined enum in "create impl"
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

BillyONeal
New Member

USA
6 Posts

Posted - Jun 10 2011 :  11:37:32 PM  Show Profile  Reply with Quote
Hello, Whole Tomato. :)

Consider the following:


class Example
{
    enum Signs
    {
        POSITIVE,
        NEGATIVE,
        ZERO,
        UNKNOWN
    };
public:
    Signs GetSign() const;
};


If you right click on "GetSign", and select "Refactor (VA X)" -> "Create Implementation", VA X will create this function:


Signs Example::GetSign() const
{
    
}


This will not compile, because the "Signs" enum is not known outside of the class. It should instead produce


Example::Signs Example::GetSign() const
{
}


Thanks!

Billy3
http://stackoverflow.com/users/82320/billy-oneal
Malware Response Instructor, BleepingComputer.com

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Jun 11 2011 :  09:56:07 AM  Show Profile  Reply with Quote
Which IDE and version of VA are you using?

I am getting the correct return type for your example code using VA 1850 and VS2008, testing in C++.

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

BillyONeal
New Member

USA
6 Posts

Posted - Jun 13 2011 :  1:13:03 PM  Show Profile  Reply with Quote
Hmm... interesting. Only happens with one of my projects. Unfortunately I can't send you guys the project -- the code is not all mine -- but if I find a concrete set of steps to repro this I'll be back. :)

Billy3

Billy3
http://stackoverflow.com/users/82320/billy-oneal
Malware Response Instructor, BleepingComputer.com
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19025 Posts

Posted - Jun 13 2011 :  1:24:16 PM  Show Profile  Reply with Quote
Interesting. It is possible namespaces or macros could be a factor here. Both of these have been known to confuse our parser now and then, and once the parser is confused things like this can happen.

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