projects
/
mono.git
/ blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
history
|
raw
|
HEAD
[runtime] Don't insta-fail when a faulty COM type is encountered. (#5616)
[mono.git]
/
mcs
/
tests
/
gtest-400.cs
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