https://bugzilla.novell.com/show_bug.cgi?id=444993


           Summary: Exit Sub wrongly disallowed in a constructor
           Product: Mono: Compilers
           Version: SVN
          Platform: i386
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Basic
        AssignedTo: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          Found By: ---


Using Exit Sub in a Sub New, which works with the MS compiler, gives this
error:

  It is not valid to use 'Exit Sub' in a Function or Property.(VBNC30065)

Workaround, use Return instead. To reproduce:

Public Class Test3
        Public Sub New(ByVal b As Boolean)
                If b Then Exit Sub
        End Sub
End Class


-- 
Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to