[Nemerle 0001137]: Wrong implementation of C# spec, clause: 7.5.5.2 Extension method invocations

1 view
Skip to first unread message

feed...@nemerle.org

unread,
Dec 22, 2008, 6:36:04 AM12/22/08
to nemerl...@googlegroups.com

The following issue has been ASSIGNED.
======================================================================
<http://nemerle.org/bugs/view.php?id=1137>
======================================================================
Reported By: VladD2
Assigned To: VladD2
======================================================================
Project: Nemerle
Issue ID: 1137
Category: Code Completion Engine
Reproducibility: always
Severity: minor
Priority: normal
Status: assigned
======================================================================
Date Submitted: 09-19-2008 14:42 CEST
Last Modified: 12-22-2008 12:36 CET
======================================================================
Summary: Wrong implementation of C# spec, clause: 7.5.5.2
Extension method invocations
Description:
Compiler should take prefer a Extension method defined in same namespace
where method is calling.
The compiler should prefer Ns1.A() in example (below):
using Ns1;
using Ns2;

interface ITest { }

namespace Ns1
{
module A { public Method(this _ : ITest) : void { } }
}

namespace Ns2
{
module B { public Method(this _ : ITest) : void { } }
}

namespace Ns1
{
class Test : ITest { }

module Program
{
Main() : void
{
def test = Test();
test.Method(); //E: typing fails on ambiguity between overloads
}
}
}

======================================================================

Issue History
Date Modified Username Field Change
======================================================================
09-19-08 14:42 VladD2 New Issue
12-22-08 12:36 VladD2 Status new => assigned
12-22-08 12:36 VladD2 Assigned To => VladD2
======================================================================

Reply all
Reply to author
Forward
0 new messages