[Mono-bugs] [Bug 44845][Wis] Changed - MCS needs to flag an error when the same type is obtained from different assemblies
bugzilla-daemon@bugzilla.ximian.com
bugzilla-daemon@bugzilla.ximian.com
Mon, 9 Feb 2004 17:14:03 -0500 (EST)
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 spouliot@videotron.ca.
http://bugzilla.ximian.com/show_bug.cgi?id=44845
--- shadow/44845 2004-01-31 02:41:26.000000000 -0500
+++ shadow/44845.tmp.4166 2004-02-09 17:14:03.000000000 -0500
@@ -308,6 +308,70 @@
------- Additional Comments From bmaurer@users.sf.net 2003-12-23 18:51 -------
This patch makes us emit a warning, like MS does. However, a few problems:
1) we do not get the location on the warning, this is pretty deep
down, not sure how to get that
2) will we create false warnings b/c we look up stuff internally?
+
+------- Additional Comments From spouliot@videotron.ca 2004-02-09 17:14 -------
+Here's another case...
+
+The class BigInteger is internal in corlib.
+The class BigInteger.ModulusRing is public (inside internal
+BigInteger) in corlib.
+
+Now we have a public BigInteger in Mono.Security - which has it's own
+public ModulusRing.
+
+MCS won't compile the unit tests for Mono.Math:
+
+# make test
+MONO_PATH="../../class/lib:$MONO_PATH" mono ../../mcs/mcs.exe
+-d:NET_1_1 -d:ONLY_1_1 -g /target:library /out:Mono.Security_test.dll
+/r:../../class/lib/Mono.Security.dll
+/r:../../class/lib/NUnit.Framework.dll /r:System.dll /unsafe
+/nowarn:0618 /nowarn:0672
+@../../build/deps/Mono.Security_test.dll.response
+Test/Mono.Math/ModRingTest.cs(29) error CS1502: The best overloaded
+match for method ' Mono.Math.BigInteger+ModulusRing..ctor
+(Mono.Math.BigInteger)' has some invalid arguments
+Test/Mono.Math/ModRingTest.cs(29) error CS1503: Argument 0: Cannot
+convert from 'Mono.Math.BigInteger' to 'Mono.Math.BigInteger'
+Test/Mono.Math/ModRingTest.cs(29) error CS1501: No overload for method
+`Mono.Math.BigInteger+ModulusRing' takes `1' arguments
+Test/Mono.Math/ModRingTest.cs(29) error CS1501: New invocation: Can
+not find a constructor in `Mono.Math.BigInteger+ModulusRing' for this
+argument list
+Test/Mono.Math/ModRingTest.cs(55) error CS1502: The best overloaded
+match for method 'Mono.Math.BigInteger
+Mono.Math.BigInteger+ModulusRing.Multiply (Mono.Math.BigInteger,
+Mono.Math.BigInteger)' has some invalid arguments
+Test/Mono.Math/ModRingTest.cs(55) error CS1503: Argument 0: Cannot
+convert from 'Mono.Math.BigInteger' to 'Mono.Math.BigInteger'
+Test/Mono.Math/ModRingTest.cs(55) error CS1501: No overload for method
+`Multiply' takes `2' arguments
+Test/Mono.Math/ModRingTest.cs(55) error CS8006: Could not find any
+applicable function for this argument list
+Test/Mono.Math/ModRingTest.cs(61) error CS1502: The best overloaded
+match for method 'Mono.Math.BigInteger
+Mono.Math.BigInteger+ModulusRing.Pow (Mono.Math.BigInteger,
+Mono.Math.BigInteger)' has some invalid arguments
+Test/Mono.Math/ModRingTest.cs(61) error CS1503: Argument 0: Cannot
+convert from 'Mono.Math.BigInteger' to 'Mono.Math.BigInteger'
+Test/Mono.Math/ModRingTest.cs(61) error CS1501: No overload for method
+`Pow' takes `2' arguments
+Test/Mono.Math/ModRingTest.cs(61) error CS8006: Could not find any
+applicable function for this argument list
+Compilation failed: 12 error(s), 0 warnings
+make: *** [Mono.Security_test.dll] Error 1
+
+Solution:
+Add the INSIDE_CORLIB for the ModulusRing class (even if it is inside
+an internal class).
+
+#if INSIDE_CORLIB
+ internal
+#else
+ public
+#endif
+ sealed class ModulusRing {
+