Quantcast
Viewing latest article 41
Browse Latest Browse All 106942

RSRP-476593: Extract Class: non compilable code is generated if method's copy is created.

Reporter Image may be NSFW.
Clik here to view.
Lilia Shamsutdinova (Lilia.Shamsutdinova)
Lilia Shamsutdinova (Lilia.Shamsutdinova)
Created Oct 10, 2019, 3:10:39 PM
Updated Oct 10, 2019, 3:11:04 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Critical
State Open
Type Bug
Fix version 2019.3
Affected versions 2019.3
Fixed In EAP Undefined
VsVersion All Versions
Branch No branch

Branch net193-alisa.refactorings.3.
JetBrains.ReSharperUltimate.2019.3.EAP2D.Checked.(193.0.20191009.124946-eap02d).

    public  class ExtractPublicProperty
    {
        public string Name { get; set; }

        private void Test()
        {
            Name = "Test";
        }
    }
  1. Invoke Extract Class on Test().
  2. Set someClass as Extracted class; select "Create Copy" in Source member dropdown for Test().
  3. Click Next.

Actual result:
Non compilable code is generated:

    public class someClass
    {
        private void Test()
        {
            Name = "Test";
        }
    }

    public class ExtractPublicProperty
    {
        public string Name { get; set; }

        private void Test()
        {
            Name = "Test";
        }
    }

Expected result:
Either error is shown along with a fix in refactoring's dialog or compilable code is generated.


Viewing latest article 41
Browse Latest Browse All 106942

Trending Articles