[metadata] Fix leaks when handling a few attributes (#16675)
[mono-project.git] / mcs / tests / test-15.cs
blob4dc7d1cee22b4d30e2ce60cdc613bbc5fed464d9
1 using System;
3 interface Iface {
4 int A ();
7 class Implementor : Iface {
8 public int A () {
9 return 1;
13 struct StructImplementor : Iface {
14 public int A () {
15 return 2;
18 class Run {
20 public static int Main ()
22 Iface iface;
23 Implementor i = new Implementor ();
25 iface = i;
26 if (iface.A () != 1)
27 return 1;
29 StructImplementor s = new StructImplementor ();
30 Iface xiface = (Iface) s;
31 if (xiface.A () != 2)
32 return 2;
34 return 0;