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:
authorMarek Safar <marek.safar@gmail.com>2014-06-24 15:52:31 +0400
committerMarek Safar <marek.safar@gmail.com>2014-06-24 16:20:15 +0400
commit4e937922fa1a857e1c74ac9127ee5d5f3b91f09d (patch)
tree5a6758771171f633da26eabf9819628be5fcb8e1 /mcs/tests/test-897.cs
parent675203a9b7d982b4ecc3762f7f4d92a54e0b1a5c (diff)
[mcs] Emit side effects of reduced probing expression
Diffstat (limited to 'mcs/tests/test-897.cs')
-rw-r--r--mcs/tests/test-897.cs26
1 files changed, 26 insertions, 0 deletions
diff --git a/mcs/tests/test-897.cs b/mcs/tests/test-897.cs
new file mode 100644
index 00000000000..e5b328255e6
--- /dev/null
+++ b/mcs/tests/test-897.cs
@@ -0,0 +1,26 @@
+using System;
+
+class X
+{
+ static int Foo ()
+ {
+ throw new ApplicationException ();
+ }
+
+ public static int Main ()
+ {
+ try {
+ var b = Foo () is object;
+ return 1;
+ } catch (ApplicationException) {
+ }
+
+ try {
+ var b = Foo () as object;
+ return 2;
+ } catch (ApplicationException) {
+ }
+
+ return 0;
+ }
+} \ No newline at end of file