[runtime] Coverage profiler fixes (#5698)
[mono.git] / mcs / tests / test-pattern-05.cs
1 // Compiler options: -langversion:experimental
2
3 using System;
4
5 class RecursiveNamedPattern
6 {
7         public static int Main ()
8         {
9                 object o = new C ();
10                 bool b = o is C (name2: "", name1: -2);
11                 if (b)
12                         return 1;
13
14                 b = o is C (name2: "n2", name1: -2);
15                 if (!b)
16                         return 2;
17
18                 b = o is C ();
19                 if (b)
20                         return 3;
21
22                 return 0;
23         }
24 }
25
26 class C
27 {
28         public static bool operator is (C c, out long name1, out string name2)
29         {
30                 name1 = -2;
31                 name2 = "n2";
32                 return true;
33         }
34
35         public static bool operator is (C c)
36         {
37                 return false;
38         }
39 }