linux-packaging-mono/mcs/tests/test-primary-ctor-05.cs
Jo Shields fe777c5c82 Imported Upstream version 3.8.0
Former-commit-id: 6a76a29bd07d86e57c6c8da45c65ed5447d38a61
2014-09-04 09:07:35 +01:00

27 lines
368 B
C#

// Compiler options: -warnaserror
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;
}
}