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

RSRP-469331: Red code for class usage before deconstructed class declaration.

$
0
0
Reporter Lilia Shamsutdinova (Lilia.Shamsutdinova) Lilia Shamsutdinova (Lilia.Shamsutdinova)
Created Apr 19, 2018 3:05:31 PM
Updated Apr 19, 2018 3:05:31 PM
Subsystem Psi - C#
Assignee Alexander Shvedov (shvedov)
Priority Normal
State Submitted
Type Bug
Fix version Backlog
Affected versions 2018.1
Fixed In Version ReSharper Undefined
VsVersion VS 2017 RTM

JetBrains ReSharper Ultimate 2018.1 12.0.20180418.033450-eap10d.

    public class Class1
    {
        private readonly Person person = new Person("John Smith", 1234567890, "10/10/1900");

        private void Test()
        {
            person //<------------------------------------------ Normal code
            var test = 1;
            person //<------------------------------------------ Red code
            var (s, b) = person;
        }
    }
    public class Person 
    {
        public string Name;
        public int Phone;

        public void Deconstruct(out string name, out bool phone)
        {
            name = Name;
            phone = Phone;
        }
    }

Actual result:
Red code appears for second person declaration (see screenshot).

Expected result:
No red code.


Viewing all articles
Browse latest Browse all 106942

Trending Articles



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