Author |
Topic |
|
supermassive
New Member
9 Posts |
Posted - Jul 05 2013 : 05:29:38 AM
|
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
19022 Posts |
Posted - Jul 05 2013 : 2:26:54 PM
|
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 |
|
|
supermassive
New Member
9 Posts |
Posted - Jul 05 2013 : 9:52:14 PM
|
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. |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Jul 08 2013 : 1:13:57 PM
|
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 |
|
|
supermassive
New Member
9 Posts |
Posted - Jul 31 2013 : 02:33:53 AM
|
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. |
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Jul 31 2013 : 4:22:33 PM
|
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 |
|
|
supermassive
New Member
9 Posts |
Posted - Jul 31 2013 : 10:54:01 PM
|
I couldn't download archive, this error appears: "File not found The file you requested cannot be found on our site. "
|
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
|
supermassive
New Member
9 Posts |
Posted - Aug 02 2013 : 12:36:34 AM
|
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!
|
|
|
feline
Whole Tomato Software
United Kingdom
19022 Posts |
Posted - Aug 02 2013 : 3:37:11 PM
|
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 |
|
|
sean
Whole Tomato Software
USA
2817 Posts |
Posted - Nov 18 2013 : 3:09:10 PM
|
case=75894 is fixed in build 2007 |
|
|
|
Topic |
|