Skip to content
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

Assert failure in SymbolDistinguisher compiling (_, _) = (1, Main()) #17921

Closed
cston opened this issue Mar 16, 2017 · 2 comments · Fixed by #18228
Closed

Assert failure in SymbolDistinguisher compiling (_, _) = (1, Main()) #17921

cston opened this issue Mar 16, 2017 · 2 comments · Fixed by #18228

Comments

@cston
Copy link
Member

cston commented Mar 16, 2017

class C
{
    static void Main()
    {
        (_, _) = (1, Main());
    }
}
Debug.Assert() failure:
Microsoft.CodeAnalysis.CSharp.SymbolDistinguisher.SymbolDistinguisher(Microsoft.CodeAnalysis.Compilation compilation, Microsoft.CodeAnalysis.CSharp.Symbol symbol0, Microsoft.CodeAnalysis.CSharp.Symbol symbol1) Line 30	C#
Microsoft.CodeAnalysis.CSharp.Binder.GenerateImplicitConversionError(Microsoft.CodeAnalysis.DiagnosticBag diagnostics, Microsoft.CodeAnalysis.Compilation compilation, Microsoft.CodeAnalysis.SyntaxNode syntax, Microsoft.CodeAnalysis.CSharp.Conversion conversion, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol sourceType, Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol targetType, Microsoft.CodeAnalysis.ConstantValue sourceConstantValueOpt) Line 2687	C#
Microsoft.CodeAnalysis.CSharp.Binder.MakeDeconstructionConversion(Microsoft.CodeAnalysis.CSharp.Symbols.TypeSymbol type, Microsoft.CodeAnalysis.SyntaxNode syntax, Microsoft.CodeAnalysis.SyntaxNode rightSyntax, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, Microsoft.CodeAnalysis.ArrayBuilder<Microsoft.CodeAnalysis.CSharp.Binder.DeconstructionVariable> variables, out Microsoft.CodeAnalysis.CSharp.Conversion conversion) Line 254	C#
Microsoft.CodeAnalysis.CSharp.Binder.BindDeconstructionAssignment(Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode node, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax left, Microsoft.CodeAnalysis.CSharp.BoundExpression boundRHS, Microsoft.CodeAnalysis.ArrayBuilder<Microsoft.CodeAnalysis.CSharp.Binder.DeconstructionVariable> checkedVariables, Microsoft.CodeAnalysis.DiagnosticBag diagnostics) Line 126	C#
Microsoft.CodeAnalysis.CSharp.Binder.BindDeconstruction(Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode deconstruction, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax left, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax right, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, ref Microsoft.CodeAnalysis.CSharp.Syntax.DeclarationExpressionSyntax declaration, ref Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax expression, Microsoft.CodeAnalysis.CSharp.BoundDeconstructValuePlaceholder rightPlaceholder) Line 96	C#
Microsoft.CodeAnalysis.CSharp.Binder.BindDeconstruction(Microsoft.CodeAnalysis.CSharp.Syntax.AssignmentExpressionSyntax node, Microsoft.CodeAnalysis.DiagnosticBag diagnostics) Line 32	C#
Microsoft.CodeAnalysis.CSharp.Binder.BindAssignment(Microsoft.CodeAnalysis.CSharp.Syntax.AssignmentExpressionSyntax node, Microsoft.CodeAnalysis.DiagnosticBag diagnostics) Line 1713	C#
Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionInternal(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax node, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, bool invoked, bool indexed) Line 470	C#
Microsoft.CodeAnalysis.CSharp.Binder.BindExpression(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax node, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, bool invoked, bool indexed) Line 396	C#
Microsoft.CodeAnalysis.CSharp.Binder.BindValue(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax node, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, Microsoft.CodeAnalysis.CSharp.Binder.BindValueKind valueKind) Line 304	C#
Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionStatement(Microsoft.CodeAnalysis.CSharp.CSharpSyntaxNode node, Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionSyntax syntax, bool allowsAnyExpression, Microsoft.CodeAnalysis.DiagnosticBag diagnostics) Line 512	C#
Microsoft.CodeAnalysis.CSharp.Binder.BindExpressionStatement(Microsoft.CodeAnalysis.CSharp.Syntax.ExpressionStatementSyntax node, Microsoft.CodeAnalysis.DiagnosticBag diagnostics) Line 505	C#
Microsoft.CodeAnalysis.CSharp.Binder.BindStatement(Microsoft.CodeAnalysis.CSharp.Syntax.StatementSyntax node, Microsoft.CodeAnalysis.DiagnosticBag diagnostics) Line 50	C#
Microsoft.CodeAnalysis.CSharp.Binder.BindBlockParts(Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax node, Microsoft.CodeAnalysis.DiagnosticBag diagnostics) Line 2336	C#
Microsoft.CodeAnalysis.CSharp.Binder.BindBlock(Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax node, Microsoft.CodeAnalysis.DiagnosticBag diagnostics) Line 2324	C#
Microsoft.CodeAnalysis.CSharp.Binder.BindEmbeddedBlock(Microsoft.CodeAnalysis.CSharp.Syntax.BlockSyntax node, Microsoft.CodeAnalysis.DiagnosticBag diagnostics) Line 2316	C#
Microsoft.CodeAnalysis.CSharp.MethodCompiler.BindMethodBody(Microsoft.CodeAnalysis.CSharp.Symbols.MethodSymbol method, Microsoft.CodeAnalysis.CSharp.TypeCompilationState compilationState, Microsoft.CodeAnalysis.DiagnosticBag diagnostics, out Microsoft.CodeAnalysis.CSharp.ImportChain importChain, out bool originalBodyNested) Line 1527	C#
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) Line 879	C#
Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileNamedType(Microsoft.CodeAnalysis.CSharp.Symbols.NamedTypeSymbol containingType) Line 434	C#
Microsoft.CodeAnalysis.CSharp.MethodCompiler.CompileNamedTypeAsTask.AnonymousMethod__0() Line 324	C#
Roslyn.Utilities.UICultureUtilities.WithCurrentUICulture.AnonymousMethod__0() Line 136	C#
@jcouv jcouv added the Feature - Tuples Tuples label Mar 17, 2017
@gafter gafter added the Bug label Mar 17, 2017
@gafter gafter self-assigned this Mar 17, 2017
@gafter gafter added this to the 15.3 milestone Mar 17, 2017
@gafter
Copy link
Member

gafter commented Mar 27, 2017

@cston Can you reproduce this in VS2017 RTM?

@gafter gafter added the Blocked label Mar 27, 2017
@gafter
Copy link
Member

gafter commented Mar 27, 2017

@cston Answered in private mail: because this is an Assert failure, it requires a DEBUG build. The master branch currently fails in this way.

@gafter gafter removed the Blocked label Mar 27, 2017
@gafter gafter added 4 - In Review A fix for the issue is submitted for review. and removed 4 - In Review A fix for the issue is submitted for review. labels Mar 27, 2017
gafter added a commit to gafter/roslyn that referenced this issue Mar 27, 2017
We also fix a crash in error recovery due to the fact that there is
no conversion from void to void.
Fixes dotnet#17921
@gafter gafter added the 4 - In Review A fix for the issue is submitted for review. label Mar 27, 2017
@gafter gafter removed the 4 - In Review A fix for the issue is submitted for review. label Apr 14, 2017
gafter added a commit that referenced this issue Apr 14, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment