[Mono-bugs] [Bug 36128][Nor] New - mcs-compiled libraries with explicit conversions not compatible with csc

bugzilla-daemon@rocky.ximian.com bugzilla-daemon@rocky.ximian.com
27 Dec 2002 09:03:07 -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 mathpup@mylinuxisp.com.

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

--- shadow/36128	Fri Dec 27 04:03:07 2002
+++ shadow/36128.tmp.22493	Fri Dec 27 04:03:07 2002
@@ -0,0 +1,54 @@
+Bug#: 36128
+Product: Mono/MCS
+Version: unspecified
+OS: 
+OS Details: SuSE Linux 8.0
+Status: NEW   
+Resolution: 
+Severity: 
+Priority: Normal
+Component: Misc
+AssignedTo: mono-bugs@ximian.com                            
+ReportedBy: mathpup@mylinuxisp.com               
+QAContact: mono-bugs@ximian.com
+TargetMilestone: ---
+URL: 
+Cc: 
+Summary: mcs-compiled libraries with explicit conversions not compatible with csc
+
+Description of Problem: 
+ 
+Assume that C# code containing a class with an explicit conversion operator is 
+compiled to a library (DLL) using mcs. If I then use Rotor's csc or Pnet's cscc to 
+compile C# code that references that library, csc (or cscc) do not recognize the 
+conversion operator and claim that the conversion is not possible. Please refer to the 
+attached files, Integer.cs and Test.cs. 
+ 
+Steps to reproduce the problem: 
+1. Create Integer.dll using `mcs /target:library Integer.cs' 
+2. Attempt to use the library with csc: `csc /r:Integer.dll Test.cs' 
+ 
+ 
+Actual Results: 
+ 
+/home/marcus/work/Test.cs(8,15): error CS0030:         Cannot convert type 
+'Integer' to 'int' 
+ 
+ 
+Expected Results: 
+ 
+Successful compilation 
+ 
+ 
+How often does this happen?  
+ 
+Always 
+ 
+ 
+Additional Information: 
+ 
+The problem is not just with explicit conversion operators. Overloaded arithmetic 
+operators (addition, subtraction, etc.) seem to have similar problems as well. This 
+bug surfaced when working with my C# bindings to GMP, which defines a large 
+number of operators. If you need more examples of the problems, let me know. I am 
+hoping that there is a single bug at the root of all the problems.