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


           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: [EMAIL PROTECTED]
        ReportedBy: [EMAIL PROTECTED]
         QAContact: [email protected]
          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)
[0x00000] 
  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.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to