提交 156cc14f 编写于 作者: M Manish Vasani

Address PR feedback and handle few more statement cases in bound block filter

上级 c13caa2e
......@@ -1007,7 +1007,12 @@ Namespace Microsoft.CodeAnalysis.Semantics
Function()
' We should not be filtering OperationKind.None statements.
' https://github.com/dotnet/roslyn/issues/21776
Return boundBlock.Statements.Select(Function(n) (s:=Create(n), bound:=n)).Where(Function(tuple) tuple.s.Kind <> OperationKind.None OrElse tuple.bound.Kind = BoundKind.TryStatement).Select(Function(tuple) tuple.s).ToImmutableArray()
Return boundBlock.Statements.Select(Function(n) (s:=Create(n), bound:=n)).Where(
Function(tuple)
Return tuple.s.Kind <> OperationKind.None OrElse tuple.bound.Kind = BoundKind.TryStatement OrElse
tuple.bound.Kind = BoundKind.WithStatement OrElse tuple.bound.Kind = BoundKind.StopStatement OrElse
tuple.bound.Kind = BoundKind.EndStatement
End Function).Select(Function(tuple) tuple.s).ToImmutableArray()
End Function)
Dim locals As ImmutableArray(Of ILocalSymbol) = boundBlock.Locals.As(Of ILocalSymbol)()
Dim syntax As SyntaxNode = boundBlock.Syntax
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册