Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

39 lines
421 B
C#

using System;
public abstract class A : IDisposable
{
public int i;
public virtual void Dispose ()
{
++i;
}
}
public abstract class B : A
{
private new void Dispose ()
{
throw new ApplicationException ("B");
}
}
public class C : B
{
public static int Main ()
{
var c = new C ();
c.Dispose ();
if (c.i != 1)
return 1;
return 0;
}
public override void Dispose ()
{
base.Dispose ();
}
}