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:
authorMiguel de Icaza <miguel@gnome.org>2003-02-15 06:58:37 +0300
committerMiguel de Icaza <miguel@gnome.org>2003-02-15 06:58:37 +0300
commit997acc630c8429ec9b9b5638c6e998225245563f (patch)
tree1fc42ee66c98b3cf451fcbf8a5d616a68e908625 /mcs/tests/test-184.cs
parent6eccd57679126f911f446339f02a3a86f70ad9ce (diff)
Add new test, for bug 37014
svn path=/trunk/mcs/; revision=11600
Diffstat (limited to 'mcs/tests/test-184.cs')
-rw-r--r--mcs/tests/test-184.cs36
1 files changed, 36 insertions, 0 deletions
diff --git a/mcs/tests/test-184.cs b/mcs/tests/test-184.cs
new file mode 100644
index 00000000000..8bb51b29545
--- /dev/null
+++ b/mcs/tests/test-184.cs
@@ -0,0 +1,36 @@
+//
+// This bug exposes a problem when calling a struct constructor that is
+// initialized from an instance constructor
+//
+using System;
+public interface Interface
+{
+ int X{ get; }
+}
+
+public struct Struct : Interface
+{
+ public Struct( int x ) { }
+ public int X { get { return 0; } }
+}
+
+public class User
+{
+ public User( Interface iface ) { }
+}
+public class Test
+{
+ User t;
+ Test() { t=new User (new Struct(5)); }
+ User t2=new User(new Struct(251));
+
+ static int Main ()
+ {
+ Test tt = new Test ();
+
+ return 0;
+ }
+}
+
+
+