repo.or.cz
/
mcs.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
2009-08-30 Jb Evain <jbevain@novell.com>
[mcs.git]
/
tests
/
gtest-400.cs
blob
af7b38b9829cf6c616c9bb5d19bf864aa3c3ae50
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
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