fc.ParametersBlock = Block;
var da_ontrue = fc.DefiniteAssignmentOnTrue;
var da_onfalse = fc.DefiniteAssignmentOnFalse;
+ var prev_tf = fc.TryFinally;
fc.DefiniteAssignmentOnTrue = fc.DefiniteAssignmentOnFalse = null;
+ fc.TryFinally = null;
block.FlowAnalysis (fc);
fc.ParametersBlock = prev_pb;
fc.DefiniteAssignment = das;
fc.DefiniteAssignmentOnTrue = da_ontrue;
fc.DefiniteAssignmentOnFalse = da_onfalse;
+ fc.TryFinally = prev_tf;
}
public override void MarkReachable (Reachability rc)
--- /dev/null
+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;
+ }
+ }
+}
\ No newline at end of file
</method>
</type>
</test>
+ <test name="test-anon-176.cs">
+ <type name="TestDelegateFinallyOut.Test">
+ <method name="Void CallDelegate(System.Action)" attrs="145">
+ <size>12</size>
+ </method>
+ <method name="Boolean TestMethod(Int32 ByRef)" attrs="145">
+ <size>75</size>
+ </method>
+ <method name="Int32 Main()" attrs="145">
+ <size>32</size>
+ </method>
+ <method name="Void <TestMethod>m__0()" attrs="145">
+ <size>7</size>
+ </method>
+ <method name="Void .ctor()" attrs="6278">
+ <size>7</size>
+ </method>
+ </type>
+ </test>
<test name="test-anon-18.cs">
<type name="A">
<method name="Void Invoke()" attrs="454">