[interp] Fall back to old implementation when calling on proxy
[mono-project.git] / mcs / tests / test-pattern-01.cs
blob84517a6a57431956468f3a253352f44a53de5e93
1 using System;
3 class TypePattern
5 public static int Main ()
7 object o = 3;
8 bool r = o is System.String t1;
9 if (r)
10 return 2;
12 if (o is string t2)
13 return 3;
15 long? l = 5;
16 bool r3 = l is long t4;
18 if (!r3)
19 return 8;
21 Console.WriteLine ("ok");
22 return 0;
25 static void Test1 (object arg)
27 while (arg is int b) {
28 b = 2;
32 static string Test2 (object arg)
34 if (arg is string s) {
35 return s;
36 } else {
37 s = "";
40 return s;