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

29 lines
540 B
C#

using System;
using System.Reflection;
[AttributeUsage (AttributeTargets.All)]
public class DocAttribute : Attribute
{
public DocAttribute () {}
public DocAttribute (string s) {}
}
public delegate void Func<[Doc] TArg, [Doc ("ret!")] TRet> ();
class Test
{
public static int Main ()
{
Type[] targs = typeof (Func<,>).GetGenericArguments ();
if (targs[0].GetCustomAttributes (false).Length != 1)
return 1;
if (targs[1].GetCustomAttributes (false).Length != 1)
return 2;
Console.WriteLine ("OK");
return 0;
}
}