Merge pull request #3540 from kumpera/abort-on-gerror
[mono.git] / mcs / tests / test-ex-filter-02.cs
index 1152682e794aa8db60695cd68f0758ba3e9103d6..9d806bcdaf1607d92ec65eb8f220847c41c6cc6d 100644 (file)
@@ -7,9 +7,9 @@ class X
                int x = -1;
                try {
                        throw new ApplicationException ();
-               } catch if (x > 0) {
+               } catch when (x > 0) {
                        return 1;
-               } catch if (x < 0) {
+               } catch when (x < 0) {
                        return 0;
                } catch {
                        return 2;
@@ -20,12 +20,12 @@ class X
        {
                try {
                        throw new ApplicationException ();
-               } catch (Exception e) if (Foo (delegate { Console.WriteLine (e); })) {
+               } catch (Exception e) when (Foo (delegate { Console.WriteLine (e); })) {
                        Action a = delegate {
                                Console.WriteLine (e);
                        };
                        return 1;
-               } catch (Exception e) if (e is InvalidOperationException) {
+               } catch (Exception e) when (e is InvalidOperationException) {
                        Console.WriteLine (e);
 
                        int paramIndex = 0;