Bug 326036 - Invalid program exception
Summary: Invalid program exception
Status: RESOLVED DUPLICATE of bug 325841
Alias: None
Product: Mono: Compilers
Classification: Mono
Component: C# (show other bugs)
Version: unspecified
Hardware: Other Other
: P5 - None : Normal
Target Milestone: ---
Assignee: Raja R Harinath
QA Contact: Mono Bugs
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-09-18 15:05 UTC by Alan McGovern
Modified: 2007-09-18 15:49 UTC (History)
2 users (show)

See Also:
Found By: ---
Services Priority:
Business Priority:
Blocker: ---
Marketing QA Status: ---
IT Deployment: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alan McGovern 2007-09-18 15:05:52 UTC
When compiling this using gmcs and running using mono, using the
daily build 15 9 2007, i am getting an invalid program expcetion.
The issue is in this line:
c[0] += new MyColor (1.0F);

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");
       }
}
Comment 1 Gert Driesen 2007-09-18 15:49:57 UTC

*** This bug has been marked as a duplicate of bug 325841 ***