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:
authorMarek Safar <marek.safar@gmail.com>2014-09-10 20:22:35 +0400
committerMarek Safar <marek.safar@gmail.com>2014-09-10 21:09:27 +0400
commit9050d9cba17623fffe575476124a946d7aa2fd8d (patch)
treeeee1c6252000df740e068a58cc113c24e64b7fad /mcs/tests/gtest-623.cs
parent156c7cf97a011cfa9dd91d69c22cd060819f8a64 (diff)
[mcs] Remove value type constrained type parameter instantiation optimization to handle parameterless struct constructors
Diffstat (limited to 'mcs/tests/gtest-623.cs')
-rw-r--r--mcs/tests/gtest-623.cs24
1 files changed, 24 insertions, 0 deletions
diff --git a/mcs/tests/gtest-623.cs b/mcs/tests/gtest-623.cs
new file mode 100644
index 00000000000..ce9b79d1bd1
--- /dev/null
+++ b/mcs/tests/gtest-623.cs
@@ -0,0 +1,24 @@
+// Compiler options: -r:gtest-623-lib.dll
+
+using System;
+
+public class C
+{
+ static bool Test<T> () where T : struct, I
+ {
+ var t = new T ();
+ if (t.GetValue () != 3)
+ return false;
+
+ return true;
+ }
+
+ public static int Main ()
+ {
+ if (!Test<S> ())
+ return 1;
+
+ Console.WriteLine ("ok");
+ return 0;
+ }
+} \ No newline at end of file