[LoongArch64] Part-5:add loongarch support in some files for LoongArch64. (#21769)
[mono-project.git] / mcs / tests / test-31.cs
blob7ede0c338a45e76e67d60f36aeebf901c8d1fb47
1 //
2 // Versioning test: make sure that we output a warning, but still call the derived
3 // method
4 //
5 using System;
7 class Base {
8 public int which;
10 public virtual void A ()
12 which = 1;
16 class Derived :Base {
17 public virtual void A ()
19 which = 2;
23 class Test {
24 public static int Main ()
26 Derived d = new Derived ();
29 // This should call Derived.A and output a warning.
31 d.A ();
34 if (d.which == 1)
35 return 1;
37 Console.WriteLine ("Test passes");
39 return 0;