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

github.com/mono/mono.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRaja R Harinath <harinath@hurrynot.org>2008-03-30 14:44:24 +0400
committerRaja R Harinath <harinath@hurrynot.org>2008-03-30 14:44:24 +0400
commit353e0fbc4f57638bd29d4bf3abcb1e977cf1cdfa (patch)
tree133e1338e4c372caf128dd07b6b0849ad3b791dd /mcs/tests/test-629.cs
parent618b08808bd562f6cb69bfac1389a01a06d7b3b1 (diff)
Fix #368224, test-629.cs
* flowanalysis.cs (FlowBranching.StealFinallyClauses): Return true if it crossed an unwind-protect boundary. * iterators.cs (Yield.CheckContext): Relax check for 'yield break'. (Yield.Resolve, Yield.DoEmit): Track whether the yield occurs inside an unwind-protected region. (YieldBreak.Resolve, YieldBreak.DoEmit): Likewise. (Iterator.MarkYield): Add 'unwind_protect' parameter. Emit a 'leave' instead of a 'br' if unwind-protected. (Iterator.EmitYieldBreak): Likewise. svn path=/trunk/mcs/; revision=99321
Diffstat (limited to 'mcs/tests/test-629.cs')
-rw-r--r--mcs/tests/test-629.cs14
1 files changed, 14 insertions, 0 deletions
diff --git a/mcs/tests/test-629.cs b/mcs/tests/test-629.cs
new file mode 100644
index 00000000000..81133012a75
--- /dev/null
+++ b/mcs/tests/test-629.cs
@@ -0,0 +1,14 @@
+using System.Collections;
+class Foo {
+ static public IEnumerable foo ()
+ {
+ try { yield break; } catch { } finally { }
+ }
+ static int Main ()
+ {
+ int i = 0;
+ foreach (object o in foo ())
+ ++i;
+ return i;
+ }
+}