[mcs] C# 7 tuple (foundation only).
[mono.git] / mcs / errors / cs0158-2.cs
1 // CS0158: The label `Foo' shadows another label by the same name in a contained scope
2 // Line: 17
3 using System;
4
5 public delegate void Hello (Test test);
6
7 public class Test
8 {
9         public void Whatever ()
10         { }
11
12         static void RunIt (Test t)
13         {
14         Foo:
15                 Hello hello = delegate (Test test) {
16                         Hello hello2 = delegate (Test test2) {
17                                 Foo:
18                                 test2.Whatever ();
19                         };
20                         hello2 (test);
21                 };
22                 hello (t);
23         }
24
25         static void Main ()
26         {
27                 Test t = new Test ();
28                 RunIt (t);
29         }
30 }