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

29 lines
509 B
C#

// Compiler options: -warnaserror
using System;
using System.Reflection;
sealed class X
{
~X ()
{
Foo ();
}
public void Foo ()
{
}
public static int Main ()
{
foreach (var m in typeof (X).GetMethods (BindingFlags.Instance | BindingFlags.NonPublic | BindingFlags.DeclaredOnly)) {
Console.WriteLine (m.Name);
Console.WriteLine (m.Attributes);
if (m.Attributes != (MethodAttributes.Virtual | MethodAttributes.Family | MethodAttributes.HideBySig))
return 1;
}
return 0;
}
}