repo.or.cz
/
mono-project.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
[ilasm] Don't break arguments compatiblity
[mono-project.git]
/
mcs
/
tests
/
test-primary-ctor-05.cs
blob
ded85daa0e1755caa600c5087741e00a4fdb01e3
1
// Compiler options: -warnaserror -langversion:experimental
2
3
using
System
;
4
using
System
.
Reflection
;
5
6
class
A
:
Attribute
7
{
8
}
9
10
[
method
:
A
]
11
class
X
(
int value
)
12
{
13
public int
f
=
value
;
14
15
public int
P { get; }
=
value
;
16
17
public static int
Main
()
18
{
19
var
x
=
typeof
(
X
);
20
var
attr
=
x
.
GetConstructors
()[
0
].
GetCustomAttribute
(
typeof
(
A
))
as
A
;
21
if
(
attr
==
null
)
22
return
2
;
23
24
return
0
;
25
}
26
}