It's not a CLR bug. The CLR properly handles overloaded method calls
where only the return value of the signature differs (i.e. covariant
return methods) . The runtime and the Partition I and II metadata specs
are very clear that members must form a unique tuple:
table/name/signature (where table has a restricted set of values).

So the CLR is working perfectly but the Remoting layer relies on
Reflection-like behavior and it's the reflecting code that doesn't quite
obey the spec. I found a similar bug wrt fields and Remoting just last
week, which MS said was a remoting bug.

-- Brent Rector, .NET Wise Owl
Demeanor for .NET - an obfuscation utility
http://www.wiseowl.com/Products/Products.aspx



-----Original Message-----
From: Henk de Koning [mailto:[EMAIL PROTECTED]] 
Sent: Saturday, May 18, 2002 2:11 PM
To: [EMAIL PROTECTED]
Subject: Re: [DOTNET] BUG: Remoting does not distinguish methods
differing only by return type


The question is if this is a documentation bug or a CLR bug ...

-- Henkk

----- Original Message -----
From: "Brent E. Rector" <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Saturday, May 18, 2002 9:25 PM
Subject: [DOTNET] BUG: Remoting does not distinguish methods differing
only by return type


> Remoting throws an ambiguous match exception when calling a method on 
> a remote MBR object that differs from another method of the type only 
> by the return type. Here's an example using pseudo-C# syntax:
>
>   internal class AppDomainInfoFetcher : System.MarshalByRefObject {
>     internal AppDomainInfo a (AssemblyName name) { . . . }
>     internal AssemblyName[] a (AssemblyName name) { . . . }
>     }
>   }
>
> Partition I 7.5.2       Assemblies and Scoping
> Generally, names are not unique. Names are collected into groupings 
> called scopes. Within a scope, a name may refer to multiple entities 
> as long as they are of different kinds (methods, fields, nested types,

> properties, and events) or have different signatures.
>
> [Brent] The two methods called 'a' above have differing signatures. 
> Only CLS Rule 6 requires the return type part of a signature to be 
> ignored. But Remoting should work for non-CLS compliant types too.
>
> CLS Rule 6: Fields and nested types shall be distinct by identifier 
> comparison alone, even though the CTS allows distinct signatures to be

> distinguished.  Methods, properties, and events that have the same 
> name (by identifier comparison) shall differ by more than just the 
> return type, except as specified in CLS Rule 39.
>
>
> -- Brent Rector, .NET Wise Owl
> Demeanor for .NET - an obfuscation utility 
> http://www.wiseowl.com/Products/Products.aspx
>
> You can read messages from the DOTNET archive, unsubscribe from 
> DOTNET, or subscribe to other DevelopMentor lists at 
> http://discuss.develop.com.
>

You can read messages from the DOTNET archive, unsubscribe from DOTNET,
or subscribe to other DevelopMentor lists at http://discuss.develop.com.

You can read messages from the DOTNET archive, unsubscribe from DOTNET, or
subscribe to other DevelopMentor lists at http://discuss.develop.com.

Reply via email to