summaryrefslogtreecommitdiff
path: root/mcs/errors/cs0162-20.cs
diff options
context:
space:
mode:
Diffstat (limited to 'mcs/errors/cs0162-20.cs')
-rw-r--r--mcs/errors/cs0162-20.cs21
1 files changed, 21 insertions, 0 deletions
diff --git a/mcs/errors/cs0162-20.cs b/mcs/errors/cs0162-20.cs
new file mode 100644
index 0000000000..e2bb4dcda6
--- /dev/null
+++ b/mcs/errors/cs0162-20.cs
@@ -0,0 +1,21 @@
+// CS0162: Unreachable code detected
+// Line: 14
+// Compiler options: -warnaserror
+
+using System;
+
+class X
+{
+
+ public static void Main ()
+ {
+ goto X;
+ A:
+ bool b = false;
+ if (b) {
+ goto A;
+ }
+ X:
+ return;
+ }
+} \ No newline at end of file