Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGert Driesen <drieseng@users.sourceforge.net>2007-09-18 12:26:46 +0400
committerGert Driesen <drieseng@users.sourceforge.net>2007-09-18 12:26:46 +0400
commit6997e2093f2a339c641244e01acf1ba62911348d (patch)
tree727290c0e272d41b954ae26f328504f1aac844e9 /mcs/tests/test-586.cs
parentfea7442321ba27b0915eeaa7ea04b36309053a81 (diff)
* test-586.cs: test for bug #325841.
* known-issues-gmcs: added test-586.cs. * known-issues-mcs: added test-586.cs. svn path=/trunk/mcs/; revision=85953
Diffstat (limited to 'mcs/tests/test-586.cs')
-rw-r--r--mcs/tests/test-586.cs32
1 files changed, 32 insertions, 0 deletions
diff --git a/mcs/tests/test-586.cs b/mcs/tests/test-586.cs
new file mode 100644
index 00000000000..328e3cea0ea
--- /dev/null
+++ b/mcs/tests/test-586.cs
@@ -0,0 +1,32 @@
+class Program
+{
+ static int Main ()
+ {
+ MyColor [] c = new MyColor [1];
+ c [0] += new MyColor (1.3F);
+ c [0] += new MyColor (1.5F);
+ if (c [0].Value != 2.8F)
+ return 1;
+ return 0;
+ }
+
+ public struct MyColor
+ {
+ private float _value;
+
+ public MyColor (float value)
+ {
+ _value = value;
+ }
+
+ public float Value
+ {
+ get { return _value; }
+ }
+
+ public static MyColor operator + (MyColor a, MyColor b)
+ {
+ return new MyColor (a._value + b._value);
+ }
+ }
+}