Quantcast
Channel: YouTrackReSharper (RSRP) - Bug and Issue Tracker
Viewing all articles
Browse latest Browse all 106942

RSRP-469263: Create parameter in containing method and pull: produces uncompilable code.

$
0
0
Reporter Lilia Shamsutdinova (Lilia.Shamsutdinova) Lilia Shamsutdinova (Lilia.Shamsutdinova)
Created Apr 13, 2018 10:11:47 PM
Updated Apr 13, 2018 10:11:47 PM
Subsystem Refactorings
Assignee Alisa Afonina (alisa.afonina)
Priority Major
State Submitted
Type Bug
Fix version Backlog
Affected versions 2018.1
Fixed In Version ReSharper Undefined
VsVersion All Versions

JetBrains ReSharper Ultimate 2018.1 #12.0.20180413.123914.

  1. Invoke "Create other -> Create parameter 'OnEndReceive' in containing method and pull" QF on OnEndReceive.

Actual result:
Uncompilable code:

        public interface IUdpClient
        {
            void Listen(int listenPort);
        }

        public class UdpClientWrapper : IUdpClient
        {
            protected UdpClient UdpClient { get; set; }

            public void Listen(int listenPort, AsyncCallback OnEndReceive)
            {
                // Refactor: Create parameter 'OnEndReceive' 
                // in containing method and update hierarchy
                UdpClient.BeginReceive(OnEndReceive, messageState);
            }
        }

Expected result:
Compilable code.

NOTE:
"Create other -> Create parameter 'OnEndReceive' in containing method" QF produces compilable code:

        public interface IUdpClient
        {
            void Listen(int listenPort, AsyncCallback OnEndReceive);
        }

        public class UdpClientWrapper : IUdpClient
        {
            protected UdpClient UdpClient { get; set; }

            public void Listen(int listenPort, AsyncCallback OnEndReceive)
            {
                // Refactor: Create parameter 'OnEndReceive' 
                // in containing method and update hierarchy
                UdpClient.BeginReceive(OnEndReceive, messageState);
            }
        }

Viewing all articles
Browse latest Browse all 106942

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>