Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Lambda assignment not highlighted correctly

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
fun4jimmy Posted - Jul 03 2014 : 08:09:54 AM
Specifying a type when assigning a lambda (or lambda result when called in place) causes visual assist to incorrectly highlight the assignment variable.

In the following example lambda will be white not the VA Variable colour.
std::function<int()> lambda = []()
{
  return 10;
};

In the following example result will be white not the VA Variable colour.
int result = []()
{
  return 10;
}();

Note that swapping int or std::function<int()> for auto results in the correct colour.
3   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Feb 15 2019 : 11:20:31 AM
No problem with asking. Unfortunately this has not yet been fixed in our parser. This is still an open bug report, but its one of many open bug reports, and is not currently a priority. But it is good to know which bug's people care about, and we do consider this when working out where to focus our efforts and bug fixes.
TheQwertiest Posted - Feb 15 2019 : 07:31:10 AM
Sorry for the necropost, but this issue still exists on the latest version of VAX. Is it a limitation imposed by VisualStudio addon API or was it just lost deep in the backlog? =)
feline Posted - Jul 03 2014 : 4:28:44 PM
I am seeing the same effect here with your first example, thank you for the clear description.

case=83470

I am guessing the auto version is working due to handling for auto, which would explain this pattern.

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