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
 bug with forward declared enum
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

supermassive
New Member

9 Posts

Posted - Jul 05 2013 :  05:29:38 AM  Show Profile  Reply with Quote


When the first line with forward declared enum is uncommented methods in class become drawn in pink color and underlined as errors. Is it a bug?

feline
Whole Tomato Software

United Kingdom
17256 Posts

Posted - Jul 05 2013 :  2:26:54 PM  Show Profile  Reply with Quote
Which IDE and version of VA are you using?

Which language is this? I am guessing C++, but using this forward declaration of the enum is not compiling for me, in VS2010. Does this compile for you?

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

supermassive
New Member

9 Posts

Posted - Jul 05 2013 :  9:52:14 PM  Show Profile  Reply with Quote
Sorry for not including this info in the first post.

VA Build 1940, VS2012 upd 2, C++.

Both variants were in .h file and compiled successfully.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17256 Posts

Posted - Jul 08 2013 :  1:13:57 PM  Show Profile  Reply with Quote
I am not seeing this underlining here. Can you please try disabling VA, via:

VAssistX -> Enable/Disable Visual Assist X

and see if the underlining disappears or not? VA should not be underlining invalid C++ code in VS2012, since the IDE does this, so this underlining should be coming from VS2012. But the IDE should not be underlining code that compiles.

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

supermassive
New Member

9 Posts

Posted - Jul 31 2013 :  02:33:53 AM  Show Profile  Reply with Quote
Actually it is not about underlining. When I put forward declared enum before class declaration colors of methods in class change to pink(or purple) and I can't navigate to theirs definition from header using Alt+G(well, navigation works in given example, but not in my complex project).
It seems having forward declared enum changes the way the subsequent class declaration is interpreted.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17256 Posts

Posted - Jul 31 2013 :  4:22:33 PM  Show Profile  Reply with Quote
If you have the time, can you please download this simple, default VS2012 console application. I have added a header file, and added a sample enum forward declare and class, based on your posting, but it does not compile for me, using VS2012 Update 3:

http://forum.wholetomato.com/colin/forumimages/topic11444_enumForwardDeclareTest.7z

Since your forward declared enum compiles, you must be doing something differently to me, which might be a factor, so it would be good to know what the difference is.

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

supermassive
New Member

9 Posts

Posted - Jul 31 2013 :  10:54:01 PM  Show Profile  Reply with Quote
I couldn't download archive, this error appears:
"File not found
The file you requested cannot be found on our site. "
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17256 Posts

Posted - Aug 01 2013 :  11:23:43 AM  Show Profile  Reply with Quote
Apologies for that, my mistake, please try this link instead:

http://forum.wholetomato.com/colin/forumimages/topic11444_enumForwardDeclareTest.zip

I have double checked the link actually works this time

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

supermassive
New Member

9 Posts

Posted - Aug 02 2013 :  12:36:34 AM  Show Profile  Reply with Quote
Don't know how to attach something here, so the corrected enumTest.h is below:

1)no brackets: class testClassAfterEnumForwardDeclare() -> class testClassAfterEnumForwardDeclare
2)semicolon at the end: } -> };

-------------------------------
#pragma once
enum testEnumForwardDeclare : int;
class testClassAfterEnumForwardDeclare
{
public:
void afterMemberOne();
void afterMemberTwo(int nParam);
};
-------------------------------

Such variant compiles and has the same problems as I mentioned above. Just play with commenting/uncommenting forward declaration and see how it affects fonts in class declaration.

Thanks!

Go to Top of Page

feline
Whole Tomato Software

United Kingdom
17256 Posts

Posted - Aug 02 2013 :  3:37:11 PM  Show Profile  Reply with Quote
I am not sure what I was thinking when I wrote the class like that, it must have been a bad day. Thank you for the fix.

I am seeing the problems with the function colouring and VA understanding the class after the enum:

case=75894

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

sean
Whole Tomato Software

USA
2817 Posts

Posted - Nov 18 2013 :  3:09:10 PM  Show Profile  Reply with Quote
case=75894 is fixed in build 2007
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2019 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000