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

RSRP-469397: Overload resolution incorrect when using in parameter vs generic parameter

$
0
0
Reporter Steve Niles (steve.niles) Steve Niles (steve.niles)
Created Apr 24, 2018 6:03:27 PM
Updated Apr 24, 2018 6:06:22 PM
Subsystem No Subsystem
Assignee Unassigned
Priority Normal
State Submitted
Type Unspecified
Fix version No Fix versions
Affected versions 2018.1
Fixed In Version ReSharper Undefined
VsVersion All Versions

When one overload uses the "in" keyword for a parameter, and the other takes in a generic type T, ReSharper thinks the generic method is the one called, while the compiler selects the "in" version. Using Visual Studio 2017 15.6.6 and C# 7.2
See attached picture for demo 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>