[Mono-dev] A bug in the latest svn mcs?

Marek Habersack grendel at caudium.net
Thu Oct 12 04:03:09 EDT 2006


  Sometime after yesterday's commits I started to get this error while
compiling mono:

make[8]: Entering directory `/usr/src/tmp/mono/mcs/class/corlib'
mcs /codepage:65001 -nowarn:169,612,618,649 -d:INSIDE_CORLIB
-d:NET_1_1 -d:ONLY_1_1 -d:BOOTSTRAP_WITH_OLDLIB -debug /noconfig
-unsafe -nostdlib -resource:resources/collation.core.bin
-resource:resources/collation.cjkKOlv2.bin -target:library
-out:mscorlib.dll  @corlib.dll.sources
System.Security.Principal/WindowsIdentity.cs(281,4): error CS1502: The
best overloaded method match for
ulong)' has some invalid arguments
System.Security.Principal/WindowsIdentity.cs(281,4): error CS1503:
Argument 2: Cannot convert from `System.IntPtr' to `ulong' Compilation
failed: 2 error(s), 0 warnings

The offending line is adding a token (an IntPtr) to a SerializationInfo
collection. Since neither SerializationInfo nor IntPtr source code were
touched for quite some time, I suspect it must be something in the
compiler. The offending line is:

  info.AddValue ("m_userToken", _token);

Casting _token to long "fixes" the compilation, but I doubt it's the
correct "solution" to this problem as IntPtr has a long conversion
operator defined - the compiler should have used it implicitly.

best regards,

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 189 bytes
Desc: not available
Url : http://lists.ximian.com/pipermail/mono-devel-list/attachments/20061012/9024388c/attachment.bin 

More information about the Mono-devel-list mailing list