-
Notifications
You must be signed in to change notification settings - Fork 4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Code causing GenerateMethodCodeFixProvider crash. #10004
Comments
Repro can be simplified to: public class C
{
}
public static class Ex
{
public static T M1<T>(this T t) where T : C
{
//The following line is incorrect. Positioning your cursor on the red
//squiggly line causes "GenerateMethodCodeFixProvider" encountered an error and has been disabled.
return t.M<T, T>();
}
} |
jmarolf
added a commit
to jmarolf/roslyn
that referenced
this issue
May 6, 2016
Previouly we assumed that the type parameters in a method would not be of the same `TypeSymbol` when generating a method and put them in a dictionary. This causes exceptions when attempting to add to the dictionary and the `TypeSymbol` is already added as a key. Now we use a list of instead of a dictionary. Fixes dotnet#10004
jmarolf
added a commit
to jmarolf/roslyn
that referenced
this issue
May 8, 2016
Previouly we assumed that the type parameters in a method would not be of the same TypeSymbol when generating a method and put them in a dictionary. This causes exceptions when attempting to add to the dictionary and the TypeSymbol is already added as a key. Now we use a list of instead of a dictionary. Fixes dotnet#10004
jmarolf
added a commit
that referenced
this issue
May 10, 2016
#11151) Previouly we assumed that the type parameters in a method would not be of the same TypeSymbol when generating a method and put them in a dictionary. This causes exceptions when attempting to add to the dictionary and the TypeSymbol is already added as a key. Now we use a list of instead of a dictionary. Fixes #10004
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Version Used:
I am doing this in:
Visual Studio 2015 Update 1
Steps to Reproduce:
Expected Behavior:
No crash.
Actual Behavior:
Get a crash.
Here's a screenshot:
The text was updated successfully, but these errors were encountered: