[Mono-bugs] [Bug 41655][Nor] Changed - Reflection method binding problem.

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
Wed, 7 May 2003 18:33:20 -0400 (EDT)

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 tom@acquist.com.


--- shadow/41655	Mon Apr 21 13:09:56 2003
+++ shadow/41655.tmp.27300	Wed May  7 18:33:20 2003
@@ -1,16 +1,16 @@
 Bug#: 41655
-Product: Mono/Runtime
+Product: Mono/Class Libraries
 Version: unspecified
+OS: unknown
 OS Details: 
 Status: NEW   
+Severity: Unknown
 Priority: Normal
-Component: misc
+Component: CORLIB
 AssignedTo: mono-bugs@ximian.com                            
 ReportedBy: tom@acquist.com               
 QAContact: mono-bugs@ximian.com
 TargetMilestone: ---
@@ -88,6 +88,22 @@
 How often does this happen? 
 Every time.
 Additional Information:
 This occurs with Mono 0.23 on RH8.
+------- Additional Comments From tom@acquist.com  2003-05-07 18:33 -------
+This issue still exists on Mono 0.24 and RH9.
+The problem with the arrays matching incorrectly is an unrelated 
+issue to the enum case demonstrated here.
+I did spend some time narrowing the enum thing down a bit.  It 
+appears that the method is not matching because in the default 
+binder's check_type method, it uses the type codes of the two types 
+to determine whether or not a cast is safe.  The created enum has a 
+typecode of "Int32", but the typecode of System.Enum is "Object".  
+(On .Net, they also have these typecodes, so that's not a bug.)  So, 
+it goes into the type code switch statement, and will fail.
+That's where the problem is, but I do not know what the best solution 
+would be.  (Explicit checks for enums?  Reworking the check_type 
+method so it will handle this sort of case first?  Something 
+completely different?)