dotnet/roslyn

VB - wrong execution flow while debugging

開放

#48,575 建立於 2020年10月13日

 (0 則留言) (0 個反應) (0 位負責人)C# (4,257 個分叉)batch import
Area-InteractiveBugLanguage-VBhelp wanted

倉庫指標

星標
 (20,414 顆星)
PR 合併指標
 (平均合併 6天 17小時) (30 天內合併 256 個 PR)

描述

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

貢獻者指南