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>2010-08-24 01:29:29 +0400
committerMarek Safar <marek.safar@gmail.com>2010-08-24 11:26:21 +0400
commit525e35d89c147b9dd84fc223aa529689c410c926 (patch)
tree3cbbbe84550d49331cece5a46ebc0e7010f5ce4e /mcs/tests/gtest-variance-15.cs
parent215677b1f8264cb9d91d239c5e1a975f1e5ee191 (diff)
Fixed type inference between upper and lower bounds
Diffstat (limited to 'mcs/tests/gtest-variance-15.cs')
-rw-r--r--mcs/tests/gtest-variance-15.cs30
1 files changed, 30 insertions, 0 deletions
diff --git a/mcs/tests/gtest-variance-15.cs b/mcs/tests/gtest-variance-15.cs
new file mode 100644
index 00000000000..7a357ff387f
--- /dev/null
+++ b/mcs/tests/gtest-variance-15.cs
@@ -0,0 +1,30 @@
+using System;
+
+public class C
+{
+ delegate void D<in T> (T t);
+
+ static void M<T> (ref T t, D<T> a)
+ {
+ a (t);
+ }
+
+ static void M2<T> (T t, D<T> a)
+ {
+ a (t);
+ }
+
+ static void MethodArg (object o)
+ {
+ }
+
+ public static int Main ()
+ {
+ D<object> action = l => Console.WriteLine (l);
+ string s = "value";
+
+ M (ref s, action);
+ M2 (s, action);
+ return 0;
+ }
+}