dotnet/roslyn

VB - wrong execution flow while debugging

Aperta

#48.575 aperta il 13 ott 2020

 (0 commenti) (0 reazioni) (0 assegnatari)C# (4257 fork)batch import
Area-InteractiveBugLanguage-VBhelp wanted

Metriche repository

Star
 (20.414 stelle)
Metriche merge PR
 (Merge medio 6g 17h) (256 PR mergiate in 30 g)

Descrizione

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

Guida contributor