{"action":"created","issue":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/3826","labels_url":"https://api.github.com/repos/dotnet/roslyn/issues/3826/labels{/name}","comments_url":"https://api.github.com/repos/dotnet/roslyn/issues/3826/comments","events_url":"https://api.github.com/repos/dotnet/roslyn/issues/3826/events","html_url":"https://github.com/dotnet/roslyn/issues/3826","id":92901121,"number":3826,"title":"ExpressionLambda Rewriter Failure when assigning to lambda parameter to self","user":{"login":"SLaks","id":313894,"avatar_url":"https://avatars.githubusercontent.com/u/313894?v=3","gravatar_id":"","url":"https://api.github.com/users/SLaks","html_url":"https://github.com/SLaks","followers_url":"https://api.github.com/users/SLaks/followers","following_url":"https://api.github.com/users/SLaks/following{/other_user}","gists_url":"https://api.github.com/users/SLaks/gists{/gist_id}","starred_url":"https://api.github.com/users/SLaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SLaks/subscriptions","organizations_url":"https://api.github.com/users/SLaks/orgs","repos_url":"https://api.github.com/users/SLaks/repos","events_url":"https://api.github.com/users/SLaks/events{/privacy}","received_events_url":"https://api.github.com/users/SLaks/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":3,"created_at":"2015-07-03T15:58:30Z","updated_at":"2015-07-03T16:10:17Z","closed_at":null,"body":"Source:\r\n\r\n```C#\r\nExpression<Func<int, int>> x = y => y = y;\r\n```\r\n\r\nVS says: \"csc2.exe\" exited with code -2146232797.\r\n\r\nThe compiler [throws](http://source.roslyn.io/#Microsoft.CodeAnalysis.CSharp/Lowering/LambdaRewriter/ExpressionLambdaRewriter.cs,237)\r\n\r\nUnexpected value 'AssignmentOperator' of type 'Microsoft.CodeAnalysis.CSharp.BoundKind'\r\n\r\nStack trace:\r\n\r\n```\r\n>\tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.ExpressionLambdaRewriter.VisitInternal(Microsoft.CodeAnalysis.CSharp.BoundExpression node)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.ExpressionLambdaRewriter.Visit(Microsoft.CodeAnalysis.CSharp.BoundExpression node)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.ExpressionLambdaRewriter.TranslateLambdaBody(Microsoft.CodeAnalysis.CSharp.BoundBlock block)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.ExpressionLambdaRewriter.VisitLambdaInternal(Microsoft.CodeAnalysis.CSharp.BoundLambda node)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.ExpressionLambdaRewriter.RewriteLambda(Microsoft.CodeAnalysis.CSharp.BoundLambda node, Microsoft.CodeAnalysis.CSharp.TypeCompilationState compilationState, Microsoft.CodeAnalysis.CSharp.Symbols.TypeMap typeMap, Microsoft.CodeAnalysis.CSharp.BinderFlags binderFlags, Microsoft.CodeAnalysis.DiagnosticBag diagnostics)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.LambdaRewriter.RewriteLambdaConversion(Microsoft.CodeAnalysis.CSharp.BoundLambda node)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.LambdaRewriter.VisitConversion(Microsoft.CodeAnalysis.CSharp.BoundConversion conversion)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.BoundConversion.Accept(Microsoft.CodeAnalysis.CSharp.BoundTreeVisitor visitor)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.BoundTreeRewriter.VisitAssignmentOperator(Microsoft.CodeAnalysis.CSharp.BoundAssignmentOperator node)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.Symbols.MethodToClassRewriter.VisitAssignmentOperator(Microsoft.CodeAnalysis.CSharp.BoundAssignmentOperator node)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.BoundAssignmentOperator.Accept(Microsoft.CodeAnalysis.CSharp.BoundTreeVisitor visitor)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.BoundTreeRewriter.VisitExpressionStatement(Microsoft.CodeAnalysis.CSharp.BoundExpressionStatement node)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.BoundExpressionStatement.Accept(Microsoft.CodeAnalysis.CSharp.BoundTreeVisitor visitor)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.BoundTreeRewriter.VisitSequencePointWithSpan(Microsoft.CodeAnalysis.CSharp.BoundSequencePointWithSpan node)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.BoundSequencePointWithSpan.Accept(Microsoft.CodeAnalysis.CSharp.BoundTreeVisitor visitor)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.LambdaRewriter.RewriteBlock(Microsoft.CodeAnalysis.CSharp.BoundBlock node, Microsoft.CodeAnalysis.ArrayBuilder<Microsoft.CodeAnalysis.CSharp.BoundExpression> prologue, Microsoft.CodeAnalysis.ArrayBuilder<Microsoft.CodeAnalysis.CSharp.Symbols.LocalSymbol> newLocals)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.LambdaRewriter.VisitBlock(Microsoft.CodeAnalysis.CSharp.BoundBlock node)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.BoundBlock.Accept(Microsoft.CodeAnalysis.CSharp.BoundTreeVisitor visitor)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.LambdaRewriter.Rewrite(Microsoft.CodeAnalysis.CSharp.BoundStatement loweredBody, Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol thisType, Microsoft.CodeAnalysis.CSharp.Symbols.ParameterSymbol thisParameter, Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol method, int methodOrdinal, Microsoft.CodeAnalysis.ArrayBuilder<Microsoft.CodeAnalysis.CodeGen.LambdaDebugInfo> lambdaDebugInfoBuilder, Microsoft.CodeAnalysis.ArrayBuilder<Microsoft.CodeAnalysis.CodeGen.ClosureDebugInfo> closureDebugInfoBuilder, Microsoft.CodeAnalysis.CodeGen.VariableSlotAllocator slotAllocatorOpt, Microsoft.CodeAnalysis.CSharp.TypeCompilationState compilationState, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, bool assignLocals)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.MethodCompiler.LowerBodyOrInitializer(Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol method, int methodOrdinal, Microsoft.CodeAnalysis.CSharp.BoundStatement body, Microsoft.CodeAnalysis.CSharp.SynthesizedSubmissionFields previousSubmissionFields, Microsoft.CodeAnalysis.CSharp.TypeCompilationState compilationState, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, ref Microsoft.CodeAnalysis.CodeGen.VariableSlotAllocator lazyVariableSlotAllocator, Microsoft.CodeAnalysis.ArrayBuilder<Microsoft.CodeAnalysis.CodeGen.LambdaDebugInfo> lambdaDebugInfoBuilder, Microsoft.CodeAnalysis.ArrayBuilder<Microsoft.CodeAnalysis.CodeGen.ClosureDebugInfo> closureDebugInfoBuilder, out Microsoft.CodeAnalysis.CSharp.StateMachineTypeSymbol stateMachineTypeOpt)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileMethod(Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol methodSymbol, int methodOrdinal, ref Microsoft.CodeAnalysis.CSharp.Binder.ProcessedFieldInitializers processedInitializers, Microsoft.CodeAnalysis.CSharp.SynthesizedSubmissionFields previousSubmissionFields, Microsoft.CodeAnalysis.CSharp.TypeCompilationState compilationState)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileNamedType(Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol symbol)\tUnknown\r\n \tMicrosoft.CodeAnalysis.CSharp.dll!Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileNamedTypeAsTask.AnonymousMethod__0()\tUnknown\r\n```"},"comment":{"url":"https://api.github.com/repos/dotnet/roslyn/issues/comments/118384484","html_url":"https://github.com/dotnet/roslyn/issues/3826#issuecomment-118384484","issue_url":"https://api.github.com/repos/dotnet/roslyn/issues/3826","id":118384484,"user":{"login":"SLaks","id":313894,"avatar_url":"https://avatars.githubusercontent.com/u/313894?v=3","gravatar_id":"","url":"https://api.github.com/users/SLaks","html_url":"https://github.com/SLaks","followers_url":"https://api.github.com/users/SLaks/followers","following_url":"https://api.github.com/users/SLaks/following{/other_user}","gists_url":"https://api.github.com/users/SLaks/gists{/gist_id}","starred_url":"https://api.github.com/users/SLaks/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/SLaks/subscriptions","organizations_url":"https://api.github.com/users/SLaks/orgs","repos_url":"https://api.github.com/users/SLaks/repos","events_url":"https://api.github.com/users/SLaks/events{/privacy}","received_events_url":"https://api.github.com/users/SLaks/received_events","type":"User","site_admin":false},"created_at":"2015-07-03T16:10:17Z","updated_at":"2015-07-03T16:10:17Z","body":"The bug is caused by http://source.roslyn.io/#Microsoft.CodeAnalysis.CSharp/Lowering/DiagnosticsPass_ExpressionTrees.cs,126, which suppresses the CS0832 in favor of CS1717 (why?)"}}