[metadata] Fix leaks when handling a few attributes (#16675)
[mono-project.git] / mcs / tests / gtest-616.cs
blob500e2542072c668e946a69f615ac451a4df797d7
1 using System;
3 struct S : IDisposable
5 public void Dispose ()
10 class A<T> where T : IDisposable
12 public virtual bool Test<U> (U u) where U : T
14 using (u) {
15 return false;
20 class B : A<S>
22 public override bool Test<U> (U u)
24 using (u) {
25 return true;
29 public static int Main ()
31 var b = new B ();
32 if (!b.Test (new S ()))
33 return 1;
35 return 0;