[mcs] Handling of nested effective base classes
[mono.git] / mcs / errors / cs1985-2.cs
1 // CS1985: The `await' operator cannot be used in a catch clause
2 // Line: 18
3
4 using System;
5 using System.Threading.Tasks;
6
7 class X
8 {
9         public static void Main ()
10         {
11         }
12
13         static async Task Test ()
14         {
15                 int x = 4;
16                 try {
17                         throw null;
18                 } catch (NullReferenceException) if (await Foo ()) {
19                         return;
20                 }
21         }
22
23         static Task<bool> Foo ()
24         {
25                 throw new NotImplementedException ();
26         }
27 }