[nem-en] Bugs in extension method implementation

Kamil Skalski kamil.skalski at gmail.com
Sat Aug 26 10:58:43 CEST 2006


Well it works for me in simple examples:

tlib.n:
public module Extend {
  public Reverse['a] (this a : array ['a]) : void {
    System.Array.Reverse (a);
  }
}

t.n:
def f (a : array [int]) {
  a.Reverse ();
}

def a = array [1,2,3];
f (a);

So it is probably some other issue. I don't remember if there was any
fresh bootstrap in boot/ since I fixed this bug, maybe this is the
reason?


2006/8/23, vc <vc at rsdn.ru>:
>    > It wasn't as hard as it seemed. Fixed :-)
>
>    If extension method contains in external assembly it's don't work.
>    For example see
>
> http://nemerle.org/svn/vs-plugin/trunk/Nemerle.Compiler.Utils/Nemerle.Comple
> tion2/CodeModel/Project.MakeCompletionList.n
>
>    line 30:
>
>    def addMember(member : IMember)
>    {
>      when (IsValid(member))
>        //Fixme: member.GetName() don't compile.
>        add (Completion.GetName(member), Elem.Member(member))
>    }
>
>    The GetName() implementation contain in
> http://nemerle.org/svn/nemerle/trunk/ncc/completion/CodeCompletionEngine.n
>
>
>
> _______________________________________________
> https://nemerle.org/mailman/listinfo/devel-en
>


-- 
Kamil Skalski
http://nazgul.omega.pl



More information about the devel-en mailing list