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
/
test-pattern-10.cs
1
using System;
2
3
class X
4
{
5
public static int Main ()
6
{
7
Test (null);
8
if (Test ((long) 0) != 1)
9
return 1;
10
11
object o = "aa";
12
if (o != null) {
13
if (o is long s) {
14
Console.WriteLine (s);
15
}
16
} else if (o is string s) {
17
Console.WriteLine (s);
18
}
19
20
return 0;
21
}
22
23
static int Test (object o)
24
{
25
if (o is long s) {
26
return 1;
27
}
28
29
return 0;
30
}
31
}