1 // Compiler options: -langversion:experimental
5 class RecursiveNamedPattern
7 public static int Main ()
9 if (Switch_1 (null) != 4)
12 if (Switch_1 ("x") != 5)
15 if (Switch_1 (1) != 1)
18 // if (Switch_1 (new C1 ()) != 3)
21 if (Switch_1 ((byte?) 1) != 1)
24 if (Switch_2 (new C1 ()) != 3)
27 if (Switch_2 (null) != 2)
30 Console
.WriteLine ("ok");
34 static int Switch_1 (object o
)
50 static int Switch_2 (C1 o
)
63 public static bool operator is (C1 c1
, out int i
)