Please do not reply to this email- if you want to comment on the bug, go to the
URL shown below and enter your comments there.

Changed by [EMAIL PROTECTED]

http://bugzilla.ximian.com/show_bug.cgi?id=74932

--- shadow/74932        2005-05-13 04:54:17.000000000 -0400
+++ shadow/74932.tmp.18227      2005-05-13 16:44:21.000000000 -0400
@@ -65,6 +65,35 @@
 Every time.
 
 Additional Information:
 
 ------- Additional Comments From [EMAIL PROTECTED]  2005-05-13 04:54 -------
 Let's change the summary to make it make more sense ;-)
+
+------- Additional Comments From [EMAIL PROTECTED]  2005-05-13 16:44 -------
+Here is some more background.
+
+The type system looks like this:
+
+class B { /* ... */ }
+
+class D3 : B { /* ... */ }
+
+B b2 = new B(); // Via some chain of function calls
+try
+{
+    Console.Out.WriteLine(b2.GetType().Name);
+    D3 p3 = (D3) b2;
+    Console.Out.WriteLine(p3.GetType().Name);
+}
+
+Because b2 is of type B, the cast in the assignment to p3 is expected 
+to fail. It does under .NET, and with Mono on every platfom we've 
+tried, except that, on Mac OS X, the assignment succeeds without 
+throwing an InvalidCastException. In other words, the above code 
+snippet prints
+
+B
+B
+
+This should be impossible because the second WriteLine should never 
+be reached.
_______________________________________________
mono-bugs maillist  -  [email protected]
http://lists.ximian.com/mailman/listinfo/mono-bugs

Reply via email to