提交 4243988d 编写于 作者: H Heejae Chang

re-enabled assert we have disabled

上级 8dc7c976
......@@ -251,11 +251,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
' e.g. SyntaxKind.MidExpression is handled elsewhere
' NOTE: There were too many "else" cases to justify listing them explicitly and throwing on
' anything unexpected.
'
' PROTOTYPE(IOperation)
' re-enable the assert once this issue is fixed
' https://github.com/dotnet/roslyn/issues/21180
' Debug.Assert(node.ContainsDiagnostics, String.Format("Unexpected {0} syntax does not have diagnostics", node.Kind))
Debug.Assert(IsSemanticModelBinder OrElse node.ContainsDiagnostics, String.Format("Unexpected {0} syntax does not have diagnostics", node.Kind))
Return BadExpression(node, ImmutableArray(Of BoundExpression).Empty, ErrorTypeSymbol.UnknownResultType)
End Select
......
......@@ -65,11 +65,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
Case SyntaxKind.ElseIfStatement
' ElseIf without a preceding If.
'
' PROTOTYPE(IOperation)
' re-enable the assert once this issue is fixed
' https://github.com/dotnet/roslyn/issues/21180
' Debug.Assert(node.ContainsDiagnostics)
Debug.Assert(IsSemanticModelBinder OrElse node.ContainsDiagnostics)
Dim condition = BindBooleanExpression(DirectCast(node, ElseIfStatementSyntax).Condition, diagnostics)
Return New BoundBadStatement(node, ImmutableArray.Create(Of BoundNode)(condition), hasErrors:=True)
......@@ -200,31 +196,27 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
' where only the ones that can appear in a method body have been selected).
'
' We simply need to ignore this, the error is already created by the parser.
'
' PROTOTYPE(IOperation)
' re-enable the assert once this issue is fixed
' https://github.com/dotnet/roslyn/issues/21180
'Debug.Assert(node.ContainsDiagnostics OrElse
' (node.IsMissing AndAlso
' (node.Parent.Kind = SyntaxKind.MultiLineSubLambdaExpression OrElse
' node.Parent.Kind = SyntaxKind.MultiLineFunctionLambdaExpression OrElse
' node.Parent.Kind = SyntaxKind.AddHandlerAccessorBlock OrElse
' node.Parent.Kind = SyntaxKind.RemoveHandlerAccessorBlock OrElse
' node.Parent.Kind = SyntaxKind.RaiseEventAccessorBlock OrElse
' node.Parent.Kind = SyntaxKind.MultiLineIfBlock OrElse
' node.Parent.Kind = SyntaxKind.ElseIfBlock OrElse
' node.Parent.Kind = SyntaxKind.ElseBlock OrElse
' node.Parent.Kind = SyntaxKind.SimpleDoLoopBlock OrElse
' node.Parent.Kind = SyntaxKind.DoWhileLoopBlock OrElse
' node.Parent.Kind = SyntaxKind.DoUntilLoopBlock OrElse
' node.Parent.Kind = SyntaxKind.WhileBlock OrElse
' node.Parent.Kind = SyntaxKind.WithBlock OrElse
' node.Parent.Kind = SyntaxKind.ForBlock OrElse
' node.Parent.Kind = SyntaxKind.ForEachBlock OrElse
' node.Parent.Kind = SyntaxKind.SyncLockBlock OrElse
' node.Parent.Kind = SyntaxKind.SelectBlock OrElse
' node.Parent.Kind = SyntaxKind.TryBlock OrElse
' node.Parent.Kind = SyntaxKind.UsingBlock)))
Debug.Assert(IsSemanticModelBinder OrElse node.ContainsDiagnostics OrElse
(node.IsMissing AndAlso
(node.Parent.Kind = SyntaxKind.MultiLineSubLambdaExpression OrElse
node.Parent.Kind = SyntaxKind.MultiLineFunctionLambdaExpression OrElse
node.Parent.Kind = SyntaxKind.AddHandlerAccessorBlock OrElse
node.Parent.Kind = SyntaxKind.RemoveHandlerAccessorBlock OrElse
node.Parent.Kind = SyntaxKind.RaiseEventAccessorBlock OrElse
node.Parent.Kind = SyntaxKind.MultiLineIfBlock OrElse
node.Parent.Kind = SyntaxKind.ElseIfBlock OrElse
node.Parent.Kind = SyntaxKind.ElseBlock OrElse
node.Parent.Kind = SyntaxKind.SimpleDoLoopBlock OrElse
node.Parent.Kind = SyntaxKind.DoWhileLoopBlock OrElse
node.Parent.Kind = SyntaxKind.DoUntilLoopBlock OrElse
node.Parent.Kind = SyntaxKind.WhileBlock OrElse
node.Parent.Kind = SyntaxKind.WithBlock OrElse
node.Parent.Kind = SyntaxKind.ForBlock OrElse
node.Parent.Kind = SyntaxKind.ForEachBlock OrElse
node.Parent.Kind = SyntaxKind.SyncLockBlock OrElse
node.Parent.Kind = SyntaxKind.SelectBlock OrElse
node.Parent.Kind = SyntaxKind.TryBlock OrElse
node.Parent.Kind = SyntaxKind.UsingBlock)))
Return New BoundBadStatement(node, ImmutableArray(Of BoundNode).Empty, hasErrors:=True)
......@@ -272,11 +264,7 @@ Namespace Microsoft.CodeAnalysis.VisualBasic
' not handling here and then throwing ExceptionUtilities.UnexpectedValue in the else case, but
' there are just too many statement SyntaxKinds in VB (e.g. declarations, statements corresponding
' to blocks handled above, etc).
'
' PROTOTYPE(IOperation)
' re-enable the assert once this issue is fixed
' https://github.com/dotnet/roslyn/issues/21180
' Debug.Assert(node.ContainsDiagnostics)
Debug.Assert(IsSemanticModelBinder OrElse node.ContainsDiagnostics)
Return New BoundBadStatement(node, ImmutableArray(Of BoundNode).Empty, hasErrors:=True)
End Function
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册