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

RSRP-469248: Code Cleanup for typed array produces invalid code

$
0
0
Reporter Nate Guerin (gusennan.1) Nate Guerin (gusennan.1)
Created Apr 13, 2018 12:33:53 AM
Updated Apr 13, 2018 12:34:36 AM
Subsystem No Subsystem
Assignee Unassigned
Priority Normal
State Submitted
Type Unspecified
Fix version No Fix versions
Affected versions No Affected versions
Fixed In Version ReSharper Undefined
VsVersion All Versions

I'm attaching a single-line .NET Core 2 Console app (though I originally found this bug in .NET 4.7.1) that is valid, but when you run "Cleanup Code" on it, the source code is made invalid. R# changes:

string[] arrayDisplayColors = new string[] { "Blue", "DarkViolet", "Brown", "??" };
to
var arrayDisplayColors = { "Blue", "DarkViolet", "Brown", "??" };

which is invalid syntax.


Viewing all articles
Browse latest Browse all 106942

Trending Articles



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