[nem-en] Re: [svn] r7311:nemerle/trunk/ncc/external/LibrariesLoader.n

Paul Bludov pbludov at gmail.com
Sun Jan 21 11:48:45 CET 2007


> You should leave the hashcode compare (just move it to parent),
> because it is faster and more reliable (actually GetHashCode is
> overriden to return compilation-unique ID assigned to every member /
> type in constructor)

You mean it isn't a bug but feature?
For example:

public SomeMethod(ty : TypeInfo) : void
{
    def someProp = ty.LookupMember("SomeProp")[0];
    def getter = someProp.GetGetter();

    ty.GetMembers().Find(getter) == None; // ???
}

In this case, the property getter is not present among the type methods, but 
it should.
The problem is that MethodOfMethodInfo(tenv, meth)  always creates a new 
MethodInfo
object with its own hash code. If you know how to make them equal - please 
fix my fix. 




More information about the devel-en mailing list