dotnet/roslyn

VB - wrong execution flow while debugging

Aberta

#48.575 aberto em 13 de out. de 2020

 (0 comentário) (0 reação) (0 responsável)C# (4.257 forks)batch import
Area-InteractiveBugLanguage-VBhelp wanted

Métricas do repositório

Stars
 (20.414 estrelas)
Métricas de merge de PR
 (Mesclagem média 6d 17h) (256 fundiu PRs em 30d)

Description

Version Used: current - VS 16.7.6 Steps to Reproduce:

    Function Test() As Boolean
        Dim sobj = New Object
        Dim o = 1

        SyncLock sobj
            If o = 1 Then
            Else
                Return False
            End If
        End SyncLock

        Return True
    End Function

Expected Behavior: Should not reach 'Return False' section of If statement Actual Behavior: Debugger reaches 'Return False' section of If statement, but without returning from function

Guia do colaborador