diff options
author | Martin Baulig <martin@novell.com> | 2005-09-26 21:51:39 +0400 |
---|---|---|
committer | Martin Baulig <martin@novell.com> | 2005-09-26 21:51:39 +0400 |
commit | 07960c391a4202b4e73bcc0bbae3ee10798e6913 (patch) | |
tree | c3222190f22e0cc2af0e5ec61fc466c36e452b29 /mcs/tests/gtest-202.cs | |
parent | 9b2024263edc05595c12d6dfe080010a9a626f7f (diff) |
2005-09-26 Martin Baulig <martin@ximian.com>
* gtest-202.cs: New test from #75681.
svn path=/trunk/mcs/; revision=50793
Diffstat (limited to 'mcs/tests/gtest-202.cs')
-rwxr-xr-x | mcs/tests/gtest-202.cs | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/mcs/tests/gtest-202.cs b/mcs/tests/gtest-202.cs new file mode 100755 index 00000000000..50a509aaf68 --- /dev/null +++ b/mcs/tests/gtest-202.cs @@ -0,0 +1,29 @@ +public class Generic<T> +{ + private T[,] container = new T[1,1]; + + public T this [int row, int col] + { + get { + return container[row, col]; + } + set { + container[row, col] = value; + } + } +} + +public struct Fault +{ + public static void Main () + { + Generic<Fault> gen = new Generic<Fault> (); + gen[0, 0] = new Fault (); + System.Console.WriteLine (gen[0, 0].ToString ()); + } + + public override string ToString () + { + return "Hi!"; + } +} |