|
Bugzilla – Full Text Bug Listing |
| Summary: | GMCS Regression using += operator on array elements | ||
|---|---|---|---|
| Product: | [Mono] Mono: Compilers | Reporter: | Joachim ANTE <joe> |
| Component: | C# | Assignee: | Marek Safar <msafar> |
| Status: | RESOLVED FIXED | QA Contact: | Mono Bugs <mono-bugs> |
| Severity: | Blocker | ||
| Priority: | P5 - None | CC: | alan.mcgovern, gert.driesen |
| Version: | 1.2 | ||
| Target Milestone: | --- | ||
| Hardware: | Other | ||
| OS: | Mac OS X 10.4 | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
Added test-586.cs to mcs/tests. *** Bug 326036 has been marked as a duplicate of this bug. *** Fixed in SVN. |
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"); } }