diff options
author | Raja R Harinath <harinath@hurrynot.org> | 2006-05-16 15:10:10 +0400 |
---|---|---|
committer | Raja R Harinath <harinath@hurrynot.org> | 2006-05-16 15:10:10 +0400 |
commit | 194db66b45e57bf1744fc4245ba50dedf7354984 (patch) | |
tree | 519dbf096069f4471e7e5ec7e9f99dfa232f11f0 /mcs/tests/test-512.cs | |
parent | edc9a1db64261438db3e8f1cbb79f427c9efd452 (diff) |
In mcs:
* flowanalysis.cs (FlowBranching.LookupLabel): Move CS0159 check ...
(FlowBranchingToplevel.LookupLabel): ... here. Add CS1632 check.
(FlowBranchingGoto.LookupLabel): New. Handle back jumps.
(FlowBranchingBlock.LookupLabel): Call LabeledStatement.AddReference
here, ...
* statement.cs (Goto.Resolve): ... not here.
(Goto.Emit): Remove CS1632 check.
In gmcs:
* flowanalysis.cs (FlowBranching.LookupLabel): Move CS0159 check ...
(FlowBranchingToplevel.LookupLabel): ... here. Add CS1632 check.
(FlowBranchingGoto.LookupLabel): New. Handle back jumps.
(FlowBranchingBlock.LookupLabel): Call LabeledStatement.AddReference
here, ...
* statement.cs (Goto.Resolve): ... not here.
(Goto.Emit): Remove CS1632 check.
In tests:
* test-511.cs, test-512.cs: New tests from #76632.
svn path=/trunk/mcs/; revision=60730
Diffstat (limited to 'mcs/tests/test-512.cs')
-rw-r--r-- | mcs/tests/test-512.cs | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/mcs/tests/test-512.cs b/mcs/tests/test-512.cs new file mode 100644 index 00000000000..a49036fd2ec --- /dev/null +++ b/mcs/tests/test-512.cs @@ -0,0 +1,21 @@ +using System; + +public class Foo { + public static void Main (string[] args) + { + try { + f (); + } + catch {} + } + + static void f () + { + throw new Exception (); + string hi = ""; + try { } + finally { + Console.WriteLine ("hi = {0}", hi); + } + } +} |