[Mono-bugs] [Bug 23123] New - Array cast throws exception
bugzilla-daemon@rocky.ximian.com
bugzilla-daemon@rocky.ximian.com
7 Apr 2002 07:00:42 -0000
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 ndrochak@gol.com.
http://bugzilla.ximian.com/show_bug.cgi?id=23123
--- shadow/23123 Sun Apr 7 03:00:42 2002
+++ shadow/23123.tmp.10502 Sun Apr 7 03:00:42 2002
@@ -0,0 +1,37 @@
+Bug#: 23123
+Product: Mono/Runtime
+Version: unspecified
+OS:
+OS Details: RedHat 7.2
+Status: NEW
+Resolution:
+Severity:
+Priority: Blocker
+Component: misc
+AssignedTo: mono-bugs@ximian.com
+ReportedBy: ndrochak@gol.com
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL:
+Cc:
+Summary: Array cast throws exception
+
+The following test case (compiled with csc) throws a
+System.InvalidCastException in both mint and mono on the line where it
+casts an object array to an Attribute array. On .NET it work fine (like
+it should).
+
+using System;
+using System.Reflection;
+namespace NS {
+ class C {
+ public static int Main() {
+ int i = 0;
+ object[] objArray = i.GetType
+().GetCustomAttributes(typeof(FlagsAttribute), false);;
+ Attribute[] attrrray = (Attribute[])objArray;
+ return 0;
+ }
+ }
+
+}