[Mono-bugs] [Bug 392456] New: Control variable not allowed after Next in For Each

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Tue May 20 05:25:01 EDT 2008


           Summary: Control variable not allowed after Next in For Each
           Product: Mono: Compilers
           Version: 1.9.0
          Platform: i686
        OS/Version: Ubuntu
            Status: NEW
          Severity: Normal
          Priority: P5 - None
         Component: Basic
        AssignedTo: rkvinge at novell.com
        ReportedBy: hesselink+novell at gmail.com
         QAContact: mono-bugs at lists.ximian.com
          Found By: Other

Created an attachment (id=216725)
 --> (https://bugzilla.novell.com/attachment.cgi?id=216725)
Test case from microsoft documentation example

Using vbnc, an error is produced when naming the control variable of a For Each
loop after the Next keyword. See
http://msdn.microsoft.com/en-us/library/5ebk1751.aspx for the documentation, or
the attached test case (from that documentation).

The error given is:

/home/erik/doc/werk/test.vb (10,18) : Error VBNC30451: Could not resolve the
name 'thisObject'
Error : VBNC99999: Unexpected error: Object reference not set to an instance of
an object
  at vbnc.Helper.VerifyValueClassification (vbnc.Expression& Expression,
vbnc.ResolveInfo Info) [0x00000] 
  at vbnc.ForEachStatement.ResolveStatement (vbnc.ResolveInfo Info) [0x00000] 
  at vbnc.CodeBlock.ResolveCode (vbnc.ResolveInfo Info) [0x00000] 
  at vbnc.MethodBaseDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000] 
  at vbnc.MethodDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000] 
  at vbnc.SubDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000] 
  at vbnc.Helper.ResolveCodeCollection (IEnumerable Collection,
vbnc.ResolveInfo Info) [0x00000] 
  at vbnc.BaseObjects`1[vbnc.IMember].ResolveCode (vbnc.ResolveInfo Info)
  at vbnc.TypeDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000] 
  at vbnc.ClassDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000] 
  at vbnc.AssemblyDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00000] 
  at vbnc.Compiler.Compile_Resolve () [0x00000] 
  at vbnc.Compiler.Compile () [0x00000]

Configure bugmail: https://bugzilla.novell.com/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the QA contact for the bug.

More information about the mono-bugs mailing list