[nem-bug] [Nemerle 0000840]: Ambiguity between overloads

feedback at nemerle.org feedback at nemerle.org
Fri Jan 26 19:01:24 CET 2007


The following issue has been CLOSED
======================================================================
<http://nemerle.org/bugs/view.php?id=840> 
======================================================================
Reported By:                VladD2
Assigned To:                nazgul
======================================================================
Project:                    Nemerle
Issue ID:                   840
Category:                   Compiler (type engine)
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     closed
Resolution:                 fixed
Fixed in Version:           
======================================================================
Date Submitted:             01-26-2007 18:51 CET
Last Modified:              01-26-2007 19:01 CET
======================================================================
Summary:                    Ambiguity between overloads
Description: 
public module Program
{
  Main() : void
  { 
    def f = Foo; // error : typing fails on ambiguity between overloads
    f(1) 
  }

  public Foo[T](_ : T) : void { }
  public Foo(_ : int)  : void { }
}
-------------------------------------------------------------------
Main.n(5,13,5,16): error : typing fails on ambiguity between overloads:
Main.n(5,13,5,16): error : Posible overload: method Program.Foo(_N_u1548 :
T.867) : void
Main.n(5,13,5,16): error : Posible overload: method Program.Foo(_N_u1549 :
int) : void
-------------------------------------------------------------------

In C# 2.0 it's OK:
using System;

class Program
{
  static void Main()
  {
    Action<int> f = Foo;
    f(1);
  }

  public static void Foo<T>(T x) { }
  public static void Foo(int x) { }
}
======================================================================
Relationships       ID      Summary
----------------------------------------------------------------------
duplicate of        0000495 wrong overload selected when poly/non-p...
======================================================================

----------------------------------------------------------------------
 nazgul - 01-26-07 19:01 
----------------------------------------------------------------------
Duplicate

Issue History
Date Modified  Username       Field                    Change              
======================================================================
01-26-07 18:51 VladD2         New Issue                                    
01-26-07 18:52 VladD2         Category                 Code Completion Engine =>
Compiler (type engine)
01-26-07 18:52 VladD2         Description Updated                          
01-26-07 18:54 VladD2         Description Updated                          
01-26-07 19:01 nazgul         Relationship added       duplicate of 0000495
01-26-07 19:01 nazgul         Duplicate ID             0 => 495            
01-26-07 19:01 nazgul         Status                   new => resolved     
01-26-07 19:01 nazgul         Resolution               open => fixed       
01-26-07 19:01 nazgul         Assigned To               => nazgul          
01-26-07 19:01 nazgul         Note Added: 0001643                          
01-26-07 19:01 nazgul         Description Updated                          
01-26-07 19:01 nazgul         Status                   resolved => closed  
======================================================================




More information about the bugs mailing list