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>2011-10-30 12:58:41 +0400
committerMarek Safar <marek.safar@gmail.com>2011-11-02 15:09:47 +0400
commit0f5a1af71c428ef4cf81a66c452a3a3c334fe978 (patch)
tree65487cf63de2fafeafd58c73101808a32918dd30 /mcs/tests/gtest-563.cs
parentddbc6cf435c9ac29639b34fd05e85a39ee2ce80f (diff)
Nullable types can satisfy only identity or base type constraints
Diffstat (limited to 'mcs/tests/gtest-563.cs')
-rw-r--r--mcs/tests/gtest-563.cs27
1 files changed, 27 insertions, 0 deletions
diff --git a/mcs/tests/gtest-563.cs b/mcs/tests/gtest-563.cs
new file mode 100644
index 00000000000..a5b208b9ef3
--- /dev/null
+++ b/mcs/tests/gtest-563.cs
@@ -0,0 +1,27 @@
+using System;
+
+struct S
+{
+}
+
+class C<U>
+{
+ static void Foo<T> (T value) where T : U
+ {
+ }
+
+ public static void Test (S? s)
+ {
+ C<S?>.Foo (s);
+ C<ValueType>.Foo (s);
+ C<object>.Foo (s);
+ }
+}
+
+class M
+{
+ public static void Main ()
+ {
+ C<int>.Test (null);
+ }
+} \ No newline at end of file