[nem-bug] [Nemerle 0000975]: Incorrect type resolution

feedback at nemerle.org feedback at nemerle.org
Mon Mar 19 23:36:05 CET 2007


The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=975> 
======================================================================
Reported By:                VladD2
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   975
Category:                   Compiler
Reproducibility:            always
Severity:                   minor
Priority:                   high
Status:                     new
======================================================================
Date Submitted:             03-19-2007 23:36 CET
Last Modified:              03-19-2007 23:36 CET
======================================================================
Summary:                    Incorrect type resolution
Description: 
using System;
using System.Console;
using Nemerle.Utility;

module Program
{
  Main() : void
  {
    def lst = [1, 2, 3, 52];
    def ary = NCollectionsUtils.MapToArray(lst, Convert.ToString); //E:
typing fails on ambiguity between overloads:
      // Posible overload: method System.Convert.ToString(value :
System.Object) : string
      // Posible overload: method System.Convert.ToString(value : int) :
string
    WriteLine(ary.ToList());
  }
}

The compiler should prefer 'int -> string' vertion of function.
======================================================================

Issue History
Date Modified  Username       Field                    Change              
======================================================================
03-19-07 23:36 VladD2         New Issue                                    
======================================================================




More information about the bugs mailing list