[Wasm] Fix memory override in mono_wasm_add_assembly
[mono-project.git] / mcs / tests / test-507.cs
blob24acbf2d77f578b98dd22b54e17cc9cf74c7b040
1 using System;
2 using System.Reflection;
4 namespace NewslotVirtualFinal
6 internal interface INewslotVirtualFinal
8 void SomeMethod();
9 void SomeMethod2();
12 internal class NewslotVirtualFinal : INewslotVirtualFinal
14 private NewslotVirtualFinal()
18 public void SomeMethod()
22 public virtual void SomeMethod2()
27 class C
29 public static int Main ()
31 Type t = typeof (NewslotVirtualFinal);
32 MethodInfo mi = t.GetMethod ("SomeMethod");
33 if (mi.Attributes != (MethodAttributes.PrivateScope | MethodAttributes.Public | MethodAttributes.Final | MethodAttributes.Virtual | MethodAttributes.HideBySig | MethodAttributes.VtableLayoutMask))
34 return 1;
36 mi = t.GetMethod ("SomeMethod2");
37 if (mi.Attributes != (MethodAttributes.PrivateScope | MethodAttributes.Public | MethodAttributes.Virtual | MethodAttributes.HideBySig | MethodAttributes.VtableLayoutMask))
38 return 2;
40 Console.WriteLine ("OK");
41 return 0;