[runtime] Synthesize IList and IReadOnlyList for the element type of enum errays...
[mono.git] / mono / tests / bug-461867.cs
1 using System;
2 using System.Runtime.InteropServices;
3
4 [AttributeUsage (AttributeTargets.Method)]
5 sealed class MonoPInvokeCallbackAttribute : Attribute {
6         public MonoPInvokeCallbackAttribute (Type t) {}
7 }
8
9 namespace TestApp
10 {
11         public delegate char MyDelegate(int x);
12
13     class Driver
14     {
15                 [MonoPInvokeCallbackAttribute (typeof (MyDelegate))]
16                 static char Test (int x) { return (char)x; }
17
18                 static int Main()
19                 {
20                         MyDelegate m = Driver.Test;
21                         Marshal.GetFunctionPointerForDelegate (m);
22                         return 0;
23                 }
24         }
25 }