Jo Shields a575963da9 Imported Upstream version 3.6.0
Former-commit-id: da6be194a6b1221998fc28233f2503bd61dd9d14
2014-08-13 10:39:27 +01:00

27 lines
381 B
C#

// CS1985: The `await' operator cannot be used in a catch clause
// Line: 18
using System;
using System.Threading.Tasks;
class X
{
public static void Main ()
{
}
static async Task Test ()
{
int x = 4;
try {
throw null;
} catch (NullReferenceException) if (await Foo ()) {
return;
}
}
static Task<bool> Foo ()
{
throw new NotImplementedException ();
}
}