Merge pull request #1861 from saper/home-override
[mono-project.git] / mcs / tests / dtest-017.cs
blob4bff54677f0217004c8ec39f211b93dcb4f7448b
1 using System;
2 using System.Collections.Generic;
4 class B<U>
8 class C<T> : B<T>
12 interface I<T> : IA<T>
16 interface IA<U>
20 struct S<T>
24 delegate dynamic D (dynamic d);
26 class DynamicAssignments
28 static void Foo (IA<object> o)
32 public static int Main ()
34 dynamic d1 = null;
35 dynamic d2 = null;
36 d1 = d2;
37 d2 = d1;
39 B<object> g1 = null;
40 B<dynamic> g2 = null;
41 g1 = g2;
42 g2 = g1;
44 B<B<object>> g_n1 = null;
45 B<B<dynamic>> g_n2 = null;
46 g_n1 = g_n2;
47 g_n2 = g_n1;
49 object[] o = null;
50 dynamic[] d = o;
52 C<object> a = null;
53 B<dynamic> b = a;
54 a = (C<object>)b;
55 a = (C<dynamic>)b;
57 I<object> io = null;
58 IA<dynamic> id = io;
60 IA<object> ia_o = null;
61 IA<dynamic> ia_d = ia_o;
63 S<dynamic> s_d = new S<dynamic> ();
64 S<object> s_o = s_d;
65 S<object>? s_o_n = s_d;
67 D del = delegate (object del_arg) {
68 return (object) null;
71 Action<IA<dynamic>> del2 = Foo;
73 Action<object> del31 = null;
74 Action<dynamic> del32 = del31;
76 I<dynamic>[] a20 = null;
77 I<object>[] b20 = a20;
79 dynamic[] d40 = null;
80 IEnumerable<object> d41 = d40;
82 return 0;