{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/23382","repository_url":"https://api.github.com/repos/dotnet/roslyn","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/23382/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/23382/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/23382/events","html_url":"https://github.com/dotnet/roslyn/issues/23382","id":276880186,"number":23382,"title":"ExtractMethod: unable to cast object of type to type","user":{"login":"vsfeedback","id":32854332,"avatar_url":"https://avatars3.githubusercontent.com/u/32854332?v=4","gravatar_id":"","url":"https://api.github.com/users/vsfeedback","html_url":"https://github.com/vsfeedback","followers_url":"https://api.github.com/users/vsfeedback/followers","following_url":"https://api.github.com/users/vsfeedback/following{/other_user}","gists_url":"https://api.github.com/users/vsfeedback/gists{/gist_id}","starred_url":"https://api.github.com/users/vsfeedback/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/vsfeedback/subscriptions","organizations_url":"https://api.github.com/users/vsfeedback/orgs","repos_url":"https://api.github.com/users/vsfeedback/repos","events_url":"https://api.github.com/users/vsfeedback/events{/privacy}","received_events_url":"https://api.github.com/users/vsfeedback/received_events","type":"User","site_admin":false},"labels":[{"id":166377917,"url":"https://api.github.com/repos/dotnet/roslyn/labels/Area-IDE","name":"Area-IDE","color":"5319e7","default":false},{"id":165001069,"url":"https://api.github.com/repos/dotnet/roslyn/labels/Bug","name":"Bug","color":"e52727","default":false},{"id":708788933,"url":"https://api.github.com/repos/dotnet/roslyn/labels/Developer%20Community","name":"Developer Community","color":"006b75","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":{"url":"https://api.github.com/repos/dotnet/roslyn/milestones/2","html_url":"https://github.com/dotnet/roslyn/milestone/2","labels_url":"https://api.github.com/repos/dotnet/roslyn/milestones/2/labels","id":937398,"number":2,"title":"Unknown","description":"This represents work which is not planned for a specific release.\r\n\r\n<!---\r\n@huboard:{\"order\":0.25}\n-->\r\n","creator":{"login":"jaredpar","id":146967,"avatar_url":"https://avatars0.githubusercontent.com/u/146967?v=4","gravatar_id":"","url":"https://api.github.com/users/jaredpar","html_url":"https://github.com/jaredpar","followers_url":"https://api.github.com/users/jaredpar/followers","following_url":"https://api.github.com/users/jaredpar/following{/other_user}","gists_url":"https://api.github.com/users/jaredpar/gists{/gist_id}","starred_url":"https://api.github.com/users/jaredpar/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jaredpar/subscriptions","organizations_url":"https://api.github.com/users/jaredpar/orgs","repos_url":"https://api.github.com/users/jaredpar/repos","events_url":"https://api.github.com/users/jaredpar/events{/privacy}","received_events_url":"https://api.github.com/users/jaredpar/received_events","type":"User","site_admin":false},"open_issues":2348,"closed_issues":385,"state":"open","created_at":"2015-01-15T20:46:02Z","updated_at":"2018-04-10T16:20:31Z","due_on":null,"closed_at":null},"comments":5,"created_at":"2017-11-27T02:01:54Z","updated_at":"2018-04-11T17:41:31Z","closed_at":null,"author_association":"NONE","body":"While typing in C# code editor I got a header bar. I clicked &quot;Enable&quot; and it appears many times. Here is the stack trace:\r\n\r\n```\r\nSystem.InvalidCastException : Unable to cast object of type 'Microsoft.CodeAnalysis.CSharp.Syntax.ConstructorDeclarationSyntax' to type 'Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax'.\r\n   at async Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.CodeGenerator`3.AddInvocationAtCallSiteAsync[TStatement,TExpression,TNodeUnderContainer](<Unknown Parameters>)\r\n   at async Microsoft.CodeAnalysis.CSharp.ExtractMethod.CSharpMethodExtractor.CSharpCodeGenerator.CreateStatementsOrInitializerToInsertAtCallSiteAsync(<Unknown Parameters>)\r\n   at async Microsoft.CodeAnalysis.CSharp.ExtractMethod.CSharpMethodExtractor.CSharpCodeGenerator.GenerateBodyForCallSiteContainerAsync(<Unknown Parameters>)\r\n   at async Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.CodeGenerator`3.GenerateAsync[TStatement,TExpression,TNodeUnderContainer](<Unknown Parameters>)\r\n   at async Microsoft.CodeAnalysis.ExtractMethod.MethodExtractor.ExtractMethodAsync(<Unknown Parameters>)\r\n   at async Microsoft.CodeAnalysis.ExtractMethod.AbstractExtractMethodService`3.ExtractMethodAsync[TValidator,TExtractor,TResult](<Unknown Parameters>)\r\n   at async Microsoft.CodeAnalysis.CodeRefactorings.ExtractMethod.ExtractMethodCodeRefactoringProvider.GetCodeActionAsync(<Unknown Parameters>)\r\n   at async Microsoft.CodeAnalysis.CodeRefactorings.ExtractMethod.ExtractMethodCodeRefactoringProvider.ComputeRefactoringsAsync(<Unknown Parameters>)\r\n   at async Microsoft.CodeAnalysis.CodeRefactorings.CodeRefactoringService.GetRefactoringFromProviderAsync(<Unknown Parameters>)\r\n   at Microsoft.VisualStudio.Telemetry.WindowsErrorReporting.WatsonReport.GetClrWatsonExceptionInfo(Exception exceptionObject)\r\n```\r\n\r\n_This issue has been moved from https://developercommunity.visualstudio.com/content/problem/148945/unable-to-cast-object-of-type-to-type.html\r\nVSTS ticketId: 523810_\r\n_These are the original issue comments:_\r\n(no comments)\r\n_These are the original issue solutions:_\r\n(no solutions)"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/380536500","html_url":"https://github.com/dotnet/roslyn/issues/23382#issuecomment-380536500","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/23382","id":380536500,"user":{"login":"CyrusNajmabadi","id":4564579,"avatar_url":"https://avatars3.githubusercontent.com/u/4564579?v=4","gravatar_id":"","url":"https://api.github.com/users/CyrusNajmabadi","html_url":"https://github.com/CyrusNajmabadi","followers_url":"https://api.github.com/users/CyrusNajmabadi/followers","following_url":"https://api.github.com/users/CyrusNajmabadi/following{/other_user}","gists_url":"https://api.github.com/users/CyrusNajmabadi/gists{/gist_id}","starred_url":"https://api.github.com/users/CyrusNajmabadi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/CyrusNajmabadi/subscriptions","organizations_url":"https://api.github.com/users/CyrusNajmabadi/orgs","repos_url":"https://api.github.com/users/CyrusNajmabadi/repos","events_url":"https://api.github.com/users/CyrusNajmabadi/events{/privacy}","received_events_url":"https://api.github.com/users/CyrusNajmabadi/received_events","type":"User","site_admin":false},"created_at":"2018-04-11T17:41:31Z","updated_at":"2018-04-11T17:41:31Z","author_association":"CONTRIBUTOR","body":"can you guys click on this button when this happens, and please provide the stack trace:\r\n\r\n![image](https://user-images.githubusercontent.com/4564579/38633553-e41a39b8-3d74-11e8-9afa-a47e27841cab.png)\r\n\r\n\r\nThanks!"}}
{"actor":{"display_login":"CyrusNajmabadi"}}