[Wasm] Fix memory override in mono_wasm_add_assembly
[mono-project.git] / mcs / tests / test-anon-159.cs
blob39832ee4f4e7c0fa6e6894cbb769275d4fcab1f4
1 using System;
3 namespace TestGenericsSubtypeMatching
5 public class Sender<T> : IDisposable
7 public void DoSend<TMessage> (Action<T> action)
9 using (Sender<T> sub = new Sender<T> ())
11 Send (t =>
13 action(t);
14 sub.ActionOnObject (t);
15 });
19 private static void Send (Action<T> action)
23 void ActionOnObject (object o)
25 o.ToString ();
28 #region IDisposable implementation
29 public void Dispose ()
31 Console.WriteLine ("Dispose!");
34 #endregion
37 public class C
39 public static void Main ()
41 new Sender<string> ().DoSend<bool>(l => Console.WriteLine (l));