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

test-anon-176.cs « tests « mcs - github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: aeeb66dd6e3aefaee5fdd2288ce945fcfb20e203 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;

namespace TestDelegateFinallyOut
{
	class Test
	{
		static void CallDelegate (Action test)
		{
			throw new Exception ("test");
		}

		private static bool TestMethod (out int test)
		{
			try {
				CallDelegate (delegate {
					return;
				});
			} catch (Exception) {
				Console.WriteLine ("caught exception");
			} finally {
			}
			test = 1;
			return false;
		}

		static int Main ()
		{
			int t;
			TestMethod (out t);
			if (t != 1)
				return 1;

			return 0;
		}
	}
}