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
[metadata] Fix leaks when handling a few attributes (#16675)
[mono-project.git]
/
mcs
/
tests
/
gtest-623.cs
blob
ce9b79d1bd1a47f9bf75544b4d8522532744b3f6
1
// Compiler options: -r:gtest-623-lib.dll
2
3
using
System
;
4
5
public class
C
6
{
7
static bool
Test
<
T
> ()
where T
:
struct
,
I
8
{
9
var
t
=
new
T
();
10
if
(
t
.
GetValue
() !=
3
)
11
return false
;
12
13
return true
;
14
}
15
16
public static int
Main
()
17
{
18
if
(!
Test
<
S
> ())
19
return
1
;
20
21
Console
.
WriteLine
(
"ok"
);
22
return
0
;
23
}
24
}