Developer forums (C::B DEVELOPMENT STRICTLY!) > CodeCompletion redesign
CC fail after A class's static method called.
oBFusCATed:
I'm not telling you that I've reproduced it :)
I've just spotted this accidentally.
Jenna:
--- Quote from: MortenMacFly on December 14, 2009, 05:51:47 pm ---
--- Quote from: oBFusCATed on December 14, 2009, 04:28:31 pm ---You're missing the
--- Code: --- A::Test(); //remove this line, then cc work well.
--- End code ---
line
--- End quote ---
--- Quote from: jens on December 14, 2009, 04:57:42 pm ---Doesn't work for me either (trunk), it also does not work if I have std::cout before the declaration of localeSoo, std::endl doesn't matter.
--- End quote ---
I did that, it still works (see image attached). Could you please try to reproduce with CC from trunk, and the testing project from trunk?
--- End quote ---
--- Quote from: jens on December 14, 2009, 04:57:42 pm ---Doesn't work for me either (trunk), it also does not work if I have std::cout before the declaration of localeSoo, std::endl doesn't matter.
--- End quote ---
MortenMacFly:
--- Quote from: jens on December 14, 2009, 06:12:56 pm ---
--- Quote from: jens on December 14, 2009, 04:57:42 pm ---Doesn't work for me either (trunk), it also does not work if I have std::cout before the declaration of localeSoo, std::endl doesn't matter.
--- End quote ---
--- End quote ---
I realised that but thought it's a mistake because putting std::cout before the definition of the global variable (struct) results in invalid code. I mean: It's outside any function / method then...?!
Could yu just post what exactly I have to put into my main file to reproduce? Surely it should be valid code somehow.... otherwise I see no value in adding support to CC for parsing invalid code. :shock:
Jenna:
--- Quote from: MortenMacFly on December 14, 2009, 07:53:14 pm ---
--- Quote from: jens on December 14, 2009, 06:12:56 pm ---
--- Quote from: jens on December 14, 2009, 04:57:42 pm ---Doesn't work for me either (trunk), it also does not work if I have std::cout before the declaration of localeSoo, std::endl doesn't matter.
--- End quote ---
--- End quote ---
I realised that but thought it's a mistake because putting std::cout before the definition of the global variable (struct) results in invalid code. I mean: It's outside any function / method then...?!
Could yu just post what exactly I have to put into my main file to reproduce? Surely it should be valid code somehow.... otherwise I see no value in adding support to CC for parsing invalid code. :shock:
--- End quote ---
I took nanyu's example from the first post.
localeSoo is a locale variable, that means it's perfectly legal to have std::cout before it.
There's no problem with global variables, but with variables, that are declared locally after the use of std::cout or the use of the static class method A::Test().
blueshake:
hi,guys
it is a bug as I knew.
you can see the debug log if turn the debugSmartSense on.
and you will find that the variable scope of localeSoo are different with/without statement A::Test();
with:
--- Quote ---FindAIMatches() Looping 1 results
FindAIMatches() Match: 'localeSoo' (30032) : 'A::Soo'
BreakUpComponents() Breaking up 'A::Soo'
BreakUpComponents() Found component: 'A' (Namespace)
BreakUpComponents() Found component: 'Soo' (SearchText)
FindAIMatches() Looking for type: 'A::Soo' (2 components)
FindAIMatches() Now looking under 'Global namespace'
FindAIMatches() ----- FindAIMatches - enter -----
--- End quote ---
without
--- Quote ---FindAIMatches() Looping 1 results
FindAIMatches() Match: 'localeSoo' (30032) : 'Soo'
BreakUpComponents() Breaking up 'Soo'
BreakUpComponents() Found component: 'Soo' (SearchText)
FindAIMatches() Looking for type: 'Soo' (1 components)
FindAIMatches() Now looking under 'Global namespace'
FindAIMatches() ----- FindAIMatches - enter -----
--- End quote ---
as I said above, the A:: will affect the scope of localeSoo
Navigation
[0] Message Index
[#] Next page
[*] Previous page
Go to full version