[interp] Reduce computation under calc_section mutex
[mono-project.git] / mcs / tests / test-pattern-05.cs
blob7553acd6df0e335dc79f078aa49e0b7609e2e3c7
1 // Compiler options: -langversion:experimental
3 using System;
5 class RecursiveNamedPattern
7 public static int Main ()
9 object o = new C ();
10 bool b = o is C (name2: "", name1: -2);
11 if (b)
12 return 1;
14 b = o is C (name2: "n2", name1: -2);
15 if (!b)
16 return 2;
18 b = o is C ();
19 if (b)
20 return 3;
22 return 0;
26 class C
28 public static bool operator is (C c, out long name1, out string name2)
30 name1 = -2;
31 name2 = "n2";
32 return true;
35 public static bool operator is (C c)
37 return false;