[nem-bug] [Nemerle 0000661]: extension method can not find member.
feedback at nemerle.org
feedback at nemerle.org
Mon May 1 11:12:12 CEST 2006
The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=661>
======================================================================
Reported By: akiramei
Assigned To: malekith
======================================================================
Project: Nemerle
Issue ID: 661
Category: Compiler
Reproducibility: always
Severity: minor
Priority: normal
Status: resolved
Resolution: fixed
Fixed in Version:
======================================================================
Date Submitted: 04-29-2006 03:13 CEST
Last Modified: 05-01-2006 11:12 CEST
======================================================================
Summary: extension method can not find member.
Description:
1. save x.n and compile to x.dll.
-- x.n
using System;
public class Extensions {
public static Print [T] (this arr : array [T] ) : void {
foreach (a in arr)
Console.Write ("{0} ", a);
Console.WriteLine ();
}
}
--
and compile.
> ncc -t:library -out:x.dll x.n
2. save y.n and compile to y.exe
-- y.n
using System;
def arr = array [1,2,3,4,5];
arr.Print ();
--
> ncc -r:x.dll -out:y.exe y.n
3. compile error.
[there is no member named `Print' in array [int] with type ?]
but add [using Extensions] then compile OK.
======================================================================
----------------------------------------------------------------------
malekith - 05-01-06 11:12
----------------------------------------------------------------------
I'm not sure why 'using' fixed this, but anyway it's fixed on trunk, r6209.
Thanks!
Issue History
Date Modified Username Field Change
======================================================================
04-29-06 03:13 akiramei New Issue
05-01-06 11:12 malekith Status new => resolved
05-01-06 11:12 malekith Resolution open => fixed
05-01-06 11:12 malekith Assigned To => malekith
05-01-06 11:12 malekith Note Added: 0001213
======================================================================
More information about the bugs
mailing list