dotnet/roslyn

VB - wrong execution flow while debugging

Open

#48,575 opened on Oct 13, 2020

View on GitHub
 (0 comments) (0 reactions) (0 assignees)C# (20,414 stars) (4,257 forks)batch import
Area-InteractiveBugLanguage-VBhelp wanted

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

Contributor guide