Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarek Safar <marek.safar@gmail.com>2014-03-03 21:09:15 +0400
committerMarek Safar <marek.safar@gmail.com>2014-03-03 21:10:08 +0400
commitdb84f82ecbc60f461f3158839fd2a8ce75994cb5 (patch)
tree5c895b178a2be34b05984f9936ae809978cfd6f7 /mcs/tests/gtest-lambda-33.cs
parent93fe81b22ea3dc05cdbe6c81086da507655107e4 (diff)
[mcs] Mark switch statement block scope statements as reachable. Fixes #18092
Diffstat (limited to 'mcs/tests/gtest-lambda-33.cs')
-rw-r--r--mcs/tests/gtest-lambda-33.cs28
1 files changed, 28 insertions, 0 deletions
diff --git a/mcs/tests/gtest-lambda-33.cs b/mcs/tests/gtest-lambda-33.cs
new file mode 100644
index 00000000000..51f8cb71770
--- /dev/null
+++ b/mcs/tests/gtest-lambda-33.cs
@@ -0,0 +1,28 @@
+// Compiler options: -warnaserror
+
+using System;
+using System.Collections.Generic;
+using System.Linq;
+
+public enum SomeEnum
+{
+ A = 1,
+ B = 2,
+}
+
+public class EnumSwitch
+{
+ public object SomeFunction<T> (SomeEnum endRole, object parent, IQueryable<T> input)
+ {
+ switch (endRole) {
+ case SomeEnum.A:
+ return input.Where (i => i != null);
+ default:
+ throw new NotImplementedException ();
+ }
+ }
+
+ public static void Main ()
+ {
+ }
+} \ No newline at end of file