linux-packaging-mono/mcs/tests/test-primary-ctor-05.cs
Jo Shields 3c1f479b9d Imported Upstream version 4.0.0~alpha1
Former-commit-id: 806294f5ded97629b74c85c09952f2a74fe182d9
2015-04-07 09:35:12 +01:00

27 lines
394 B
C#

// Compiler options: -warnaserror -langversion:experimental
using System;
using System.Reflection;
class A : Attribute
{
}
[method:A]
class X (int value)
{
public int f = value;
public int P { get; } = value;
public static int Main ()
{
var x = typeof (X);
var attr = x.GetConstructors ()[0].GetCustomAttribute (typeof (A)) as A;
if (attr == null)
return 2;
return 0;
}
}