[Mono-devel-list] Problem with System.Reflection.ConstructorInfo

Etienne Boucher etienne at novat.qc.ca
Mon Mar 8 18:13:49 EST 2004


After some testing, I have found that the problem is not within the lines indicated by mcs. The problem seems to be with creating an array from an array initilizer list of more than 6 elements. Rather strange bug if you ask me. Anyone else can test this little snipet, to make sure it's not just me? Note that it compiles fine when using ConstructorInfo[] ciarray = new ConstructorInfo[7];

using System;
using System.Reflection;
public class CtorInfoTest
{
    public static void Main(string[] args)
    {
        // mcs throws with 7 or more elements in the array initializer
        ConstructorInfo[] ciarray = 
        {
            null,
            null,
            null,
            null,
            null,
            null,
            null,
        };
    }
}


> > I recently installed SuSE in order to be able to test Mono. The first thing
> > I tried was to compile some of my .NET code with mcs, but sadly I never got
> > any farther. What ever I tried the compiler always threw an exception about
> > ConstructorInfo being undefined. Here is the what I got in the shell:
> 
> The code provides enough information about what MCS is having problems
> with, you need to produce a small test case, and submit it to Bugzilla:
> 
> > Exception caught by the compiler while compiling:
> >    Block that caused the problem begin at: HotlineField.cs: (21)
> >                      Block being compiled: [HotlineField.cs: (31),Internal:
> > (1)]
> 
> The code is in HotlineField.cs starting at line 21-31 and extending to
> the end of that block.
> 
> 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.ximian.com/pipermail/mono-devel-list/attachments/20040308/adbecfe4/attachment.html 


More information about the Mono-devel-list mailing list