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
[corlib] Add a special method for XI so the linker does not always have to generate it.
[mono-project.git]
/
mcs
/
tests
/
gtest-400.cs
blob
90a82add53a3a2d513d274d1c70a8129f3af3739
1
using
System
;
2
3
class
Gen
<
T
>
where T
:
class
4
{
5
public static bool
Foo
(
T t
)
6
{
7
return
t
is
Program
;
8
}
9
}
10
11
class
Program
12
{
13
static bool
Foo
<
T
> ()
14
{
15
object
o
=
1
;
16
return
o
is
T
;
17
}
18
19
public static int
Main
()
20
{
21
if
(
Foo
<
bool
> ())
22
return
1
;
23
24
if
(!
Foo
<
int
> ())
25
return
2
;
26
27
if
(
Gen
<
object
>.
Foo
(
null
))
28
return
3
;
29
30
if
(!
Gen
<
Program
>.
Foo
(
new
Program
()))
31
return
4
;
32
33
Console
.
WriteLine
(
"ok"
);
34
return
0
;
35
}
36
}
37