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:
authorMiguel de Icaza <miguel@gnome.org>2001-10-10 06:36:47 +0400
committerMiguel de Icaza <miguel@gnome.org>2001-10-10 06:36:47 +0400
commitc07b3a44d91fb7e3e4872ec3b72b8ee2c3e7c399 (patch)
tree58713a45e06e3d3eaf7f1be5812dc051f68d5fd7 /mcs/tests/test-18.cs
parent0d98160fe4ed138a8d06efd4b29265af81052b60 (diff)
2001-10-10 Miguel de Icaza <miguel@ximian.com>
* makefile: Renamed the compiler to `mcs.exe' instead of compiler.exe * expression.cs (ImplicitReferenceConversion): handle null as well as a source to convert to any reference type. * statement.cs (Return): Perform any implicit conversions to expected return type. Validate use of return statement. * codegen.cs (EmitContext): Pass the expected return type here. * class.cs (Method, Constructor, Property): Pass expected return type to EmitContext. 2001-10-09 Miguel de Icaza <miguel@ximian.com> * expression.cs: Make DoResolve take an EmitContext instead of a TypeContainer. Replaced `l' and `location' for `loc', for consistency. (Error, Warning): Remove unneeded Tc argument. * assign.cs, literal.cs, constant.cs: Update to new calling convention. * codegen.cs: EmitContext now contains a flag indicating whether code is being generated in a static method or not. * cs-parser.jay: DecomposeQI, new function that replaces the old QualifiedIdentifier. Now we always decompose the assembled strings from qualified_identifier productions into a group of memberaccesses. 2001-10-08 Miguel de Icaza <miguel@ximian.com> * rootcontext.cs: Deal with field-less struct types correctly now by passing the size option to Define Type. * class.cs: Removed hack that created one static field. 2001-10-07 Miguel de Icaza <miguel@ximian.com> * statement.cs: Moved most of the code generation here. svn path=/trunk/mcs/; revision=1126
Diffstat (limited to 'mcs/tests/test-18.cs')
-rw-r--r--mcs/tests/test-18.cs33
1 files changed, 33 insertions, 0 deletions
diff --git a/mcs/tests/test-18.cs b/mcs/tests/test-18.cs
new file mode 100644
index 00000000000..efa05510a15
--- /dev/null
+++ b/mcs/tests/test-18.cs
@@ -0,0 +1,33 @@
+using System;
+
+class X {
+ static int i;
+ static int j;
+
+ static void m ()
+ {
+ i = 0;
+ j = 0;
+
+ try {
+ throw new ArgumentException ("Blah");
+ } catch (ArgumentException){
+ i = 1;
+ } catch (Exception){
+ i = 2;
+ } finally {
+ j = 1;
+ }
+ }
+
+ static int Main ()
+ {
+ m ();
+ if (i != 1)
+ return 1;
+ if (j != 1)
+ return 2;
+
+ return 0;
+ }
+}