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

RSRP-274107: Automatically creating a member

$
0
0
Reporter Werner Strydom (bloudraak) Werner Strydom (bloudraak)
Created Jul 17, 2011 2:29:36 AM
Updated Mar 27, 2012 5:03:10 PM
Priority Major
Type Bug
Fix versions 7.0
State Open
Assignee Alexey Kuptsov (alexey.kuptsov)
Subsystem Code Completion
Affected versions 6.0
Fixed in build No Fixed in build
Consider the following classes in a project
class MyClass<T> 
{
}

class MyApp
{
}


In another class, enter the following code snippet:

public MyClass<int> cls = MyApp.Default; 


Since the field of Default doesn't exist, ReSharper provides you with an option to create it. In ReSharper 5, selecting to create a field will create it with the correct type, a.k.a.
class MyApp
{
   public static MyClass<int> Default;
}


however, in ReShaper 6, it creates with the incorrect type:
class MyApp
{
   public static object Default;
}


Werner

Viewing all articles
Browse latest Browse all 106942

Trending Articles



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