[Mono-bugs] [Bug 325841] New: GMCS Regression using += operator on array elements

bugzilla_noreply at novell.com bugzilla_noreply at novell.com
Mon Sep 17 18:12:27 EDT 2007


           Summary: GMCS Regression using += operator on array elements
           Product: Mono: Compilers
           Version: 1.2
          Platform: Other
        OS/Version: Mac OS X 10.4
            Status: NEW
          Severity: Blocker
          Priority: P5 - None
         Component: C#
        AssignedTo: rharinath at novell.com
        ReportedBy: joe at unity3d.com
         QAContact: mono-bugs at ximian.com
          Found By: ---

The following script when compiled by gmcs and run with mono using 15 9 2007
daily build, will give an invalid program exception. Using 1.2.5 this script
compiles & runs flawlessly.
The culprit is the += operator when used on on array elements.

class Testing
        public struct MyColor
                float _value;

                public MyColor (float invalue)
                        _value =  invalue;      

                static public MyColor operator + (MyColor a, MyColor b)
                        return new MyColor(a._value + b._value);        

        static void Main () {
                MyColor[] c = new MyColor [1];
                c[0] += new MyColor (1.0F);
                System.Console.WriteLine("Finnished running to the end");

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