[Mono-bugs] [Bug 629370] New: Implicit local variable broken 3: Functions returning arrays

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Sat Aug 7 17:00:17 EDT 2010


http://bugzilla.novell.com/show_bug.cgi?id=629370

http://bugzilla.novell.com/show_bug.cgi?id=629370#c0


           Summary: Implicit local variable broken 3: Functions returning
                    arrays
    Classification: Mono
           Product: Mono: Compilers
           Version: 2.6.x
          Platform: x86
        OS/Version: openSUSE 11.3
            Status: NEW
          Severity: Minor
          Priority: P5 - None
         Component: Basic
        AssignedTo: rkvinge at novell.com
        ReportedBy: simar at gmx.net
         QAContact: mono-bugs at lists.ximian.com
          Found By: ---
           Blocker: ---


Created an attachment (id=381419)
 --> (http://bugzilla.novell.com/attachment.cgi?id=381419)
Implicit local array variable looses it's magic alternate personality as an
object. Commented out is equivalent working code.

User-Agent:       Mozilla/5.0 (X11; U; Linux i686; de; rv:1.9.2.8)
Gecko/20100723 SUSE/3.6.8-0.1.1 Firefox/3.6.8

If you use the implicit local variable as an object to e.g. get the upper bound
or sth else the compiler doesn't seem to know if the function should be called
recursively. Btw.: what should "Huh?" tell me?

Reproducible: Always

Steps to Reproduce:
1. Try to compile TestCase3.vb
Actual Results:  
A "Huh?" exception complaining about the functions parameters I didn't specify.
vbnc
"-out:/home/simar/Projects/SizeParamIndex_notImplemented/SizeParamIndex_notImplemented/bin/Debug/SizeParamIndex_notImplemented.dll"
-nologo -utf8output -quiet -debug:full -optionstrict+ -optionexplicit+
-optioncompare:binary -optioninfer-
-rootnamespace:SizeParamIndex_notImplemented -main:TestCase -target:library 
"/home/simar/Projects/SizeParamIndex_notImplemented/SizeParamIndex_notImplemented/TestCase.vb"
"/home/simar/Projects/SizeParamIndex_notImplemented/SizeParamIndex_notImplemented/TestCase2.vb"
"/home/simar/Projects/SizeParamIndex_notImplemented/SizeParamIndex_notImplemented/TestCase3.vb"
"/home/simar/Projects/SizeParamIndex_notImplemented/SizeParamIndex_notImplemented/TestCase4.vb"
/home/simar/Projects/SizeParamIndex_notImplemented/SizeParamIndex_notImplemented/TestCase3.vb
(17,60) : Error VBNC30455: Argument not specified for parameter 'anyParam' of
'ReturnAnArray((System.Object, System.Object))'.

/home/simar/Projects/SizeParamIndex_notImplemented/SizeParamIndex_notImplemented/TestCase3.vb
(17,60) : Error VBNC30455: Argument not specified for parameter 'anotherParam'
of 'ReturnAnArray((System.Object, System.Object))'.

/home/simar/Projects/SizeParamIndex_notImplemented/SizeParamIndex_notImplemented/TestCase3.vb
(17,61) : Error VBNC99999: Huh?

/home/simar/Projects/SizeParamIndex_notImplemented/SizeParamIndex_notImplemented/<MyGenerator>
(1,1) : Error VBNC99999: Unexpected error: Object reference not set to an
instance of an object

  at vbnc.MemberAccessExpression.ResolveExpressionInternal (vbnc.ResolveInfo
Info) [0x00aa2] in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/Expressions/MemberAccessExpression.vb:481 
  at vbnc.Expression.ResolveExpression (vbnc.ResolveInfo ResolveInfo) [0x00008]
in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/Expressions/Expression.vb:229 
  at vbnc.InvocationOrIndexExpression.ResolveExpressionInternal
(vbnc.ResolveInfo Info) [0x00002] in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/Expressions/InvocationOrIndexExpression.vb:242 
  at vbnc.Expression.ResolveExpression (vbnc.ResolveInfo ResolveInfo) [0x00008]
in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/Expressions/Expression.vb:229 
  at vbnc.Expression.ResolveCode (vbnc.ResolveInfo Info) [0x00000] in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/Expressions/Expression.vb:305 
  at vbnc.VariableInitializer.ResolveCode (vbnc.ResolveInfo Info) [0x00009] in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/Members/VariableInitializer.vb:78 
  at vbnc.VariableDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x000b5] in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/Members/VariableDeclaration.vb:281 
  at vbnc.CodeBlock.ResolveCode (vbnc.ResolveInfo Info) [0x00046] in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/Code/CodeBlock.vb:594 
  at vbnc.MethodBaseDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00065]
in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/General/MethodBaseDeclaration.vb:226 
  at vbnc.MethodDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00002] in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/Members/MethodDeclaration.vb:87 
  at vbnc.SubDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00037] in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/Members/SubDeclaration.vb:122 
  at vbnc.Helper.ResolveCodeCollection (IEnumerable Collection,
vbnc.ResolveInfo Info) [0x00044] in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/General/Helper.vb:2351 
  at vbnc.BaseObjects`1[T].ResolveCode (vbnc.ResolveInfo Info) [0x00000] in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/General/BaseObjects`1.vb:65 
  at vbnc.TypeDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x0001c] in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/TypeDeclarations/TypeDeclaration.vb:487 
  at vbnc.ClassDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x00002] in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/TypeDeclarations/ClassDeclaration.vb:125 
  at vbnc.AssemblyDeclaration.ResolveCode (vbnc.ResolveInfo Info) [0x0002a] in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/TypeDeclarations/AssemblyDeclaration.vb:209 
  at vbnc.Compiler.Compile_Resolve () [0x001a9] in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/General/Compiler.vb:428 
  at vbnc.Compiler.Compile () [0x0028a] in
/usr/src/packages/BUILD/mono-basic-2.6.2/vbnc/vbnc/source/General/Compiler.vb:561 

Compilation took 00:00:00.5978510

Expected Results:  
A compiled binary.

-- 
Configure bugmail: http://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