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

34 lines
538 B
C#

using System;
using System.Reflection;
public class TestAttribute : Attribute
{
public Type type;
public TestAttribute(Type type)
{
this.type = type;
}
}
class C<T>
{
[Test(typeof(C<string>))]
public static void Foo()
{
}
}
public class C
{
public static int Main ()
{
MethodInfo mi = typeof (C<>).GetMethod ("Foo");
object[] a = mi.GetCustomAttributes (false);
if (((TestAttribute)a[0]).type.ToString() != "C`1[System.String]")
return 1;
Console.WriteLine("OK");
return 0;
}
}