[Mono-bugs] [Bug 36128][Nor] New - mcs-compiled libraries with explicit conversions not compatible with csc
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 email@example.com.
--- shadow/36128 Fri Dec 27 04:03:07 2002
+++ shadow/36128.tmp.22493 Fri Dec 27 04:03:07 2002
@@ -0,0 +1,54 @@
+OS Details: SuSE Linux 8.0
+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'
+/home/marcus/work/Test.cs(8,15): error CS0030: Cannot convert type
+'Integer' to 'int'
+How often does this happen?
+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.