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>2013-02-19 02:28:48 +0400
committerMarek Safar <marek.safar@gmail.com>2013-02-19 02:29:32 +0400
commiteb949bf826db5d01b999101acec00549e570080e (patch)
treeab2b8c817b25d734896a35e4101b2ce4a6ec4c01 /mcs/tests/test-865.cs
parentf918007ba8bf0cf9e8931be8f5fe2b56acd6bc61 (diff)
Emit valid il code for conditional expression of two casted interfaces
Diffstat (limited to 'mcs/tests/test-865.cs')
-rw-r--r--mcs/tests/test-865.cs31
1 files changed, 31 insertions, 0 deletions
diff --git a/mcs/tests/test-865.cs b/mcs/tests/test-865.cs
new file mode 100644
index 00000000000..62beace6ce6
--- /dev/null
+++ b/mcs/tests/test-865.cs
@@ -0,0 +1,31 @@
+class C
+{
+ public static void Main ()
+ {
+ Create (false);
+ }
+
+ static IA Create (bool arg)
+ {
+ // Verifier issue
+ IA runner = arg ? new B2 () : (IA) new B1 ();
+ return runner;
+ }
+}
+
+interface IA
+{
+
+}
+
+class B2 : IA
+{
+}
+
+class B1 : B
+{
+}
+
+class B : IA
+{
+} \ No newline at end of file