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
 Rename constructor parameter and class member
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Valiko
New Member

6 Posts

Posted - Nov 15 2018 :  08:41:02 AM  Show Profile  Reply with Quote
VAX v.10.9.2291.5.
VS2017 v.15.9.0.
Project configuration: Release x64 console app.

ORIGINAL CODE:

struct Node
{
    Node(uint64_t key)
    : key(key)
    {
    }

    uint64_t key;
};

CASE1: I select "key" in constructor parameter list and Rename it to "state". I expect to get the following code:

struct Node
{
    Node(uint64_t state)
    : key(state)
    {
    }

    uint64_t key;
};

but get the following (which is obviously not compiled):

struct Node
{
    Node(uint64_t state)
    : state(state)
    {
    }

    uint64_t key;
};

CASE2: When I select "key" member and Rename it to "state" (in the same original code). I expect to get:

struct Node
{
    Node(uint64_t key)
    : state(key)
    {
    }

    uint64_t state;
};

but get the following (which is obviously not compiled):

struct Node
{
    Node(uint64_t key)
    : key(key)
    {
    }

    uint64_t state;
};


In both cases other entity could be shown in candidates list but left unchecked so that user could select it if they want.

Edited by - Valiko on Nov 15 2018 08:43:45 AM

feline
Whole Tomato Software

United Kingdom
18724 Posts

Posted - Nov 16 2018 :  11:18:45 AM  Show Profile  Reply with Quote
I am seeing the same problem here, thank you for the clear example:

case=41620

this is a situation where it is legal to use the same symbol name for both the parameter and the class member variable. Unfortunately this confuses our parser, so we are not limiting the scope correctly here, hence the bug.

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