[nem-bug] [Nemerle 0000843]: Incorrect compilation of generic lambda
feedback at nemerle.org
feedback at nemerle.org
Mon Jan 29 01:43:05 CET 2007
The following issue requires your FEEDBACK.
======================================================================
<http://nemerle.org/bugs/view.php?id=843>
======================================================================
Reported By: VladD2
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 843
Category: Compiler
Reproducibility: always
Severity: minor
Priority: normal
Status: feedback
======================================================================
Date Submitted: 01-27-2007 15:30 CET
Last Modified: 01-29-2007 01:43 CET
======================================================================
Summary: Incorrect compilation of generic lambda
Description:
using System;
using System.Console;
def cmp = fun[T](x : T, y : T) where T: IComparable[T] { x.CompareTo(y)
};
WriteLine(cmp("1", "02"));
WriteLine(cmp(1, 2)); // Error: in argument
http://nemerle.org/bugs/view.php?id=1 of cmp, needed a
string, got int
WriteLine(cmp(1.8, 2.0)); // Error: in argument
http://nemerle.org/bugs/view.php?id=1 of cmp, needed a
string, got System.Double
======================================================================
----------------------------------------------------------------------
malekith - 01-29-07 01:43
----------------------------------------------------------------------
I guess we should just disallow that (fun[T] ...). The typesystem doesn't
allow any value to be polymorphic -- it is limited to local and global
functions.
Issue History
Date Modified Username Field Change
======================================================================
01-27-07 15:30 VladD2 New Issue
01-29-07 01:43 malekith Note Added: 0001656
01-29-07 01:43 malekith Status new => feedback
01-29-07 01:43 malekith Description Updated
======================================================================
More information about the bugs
mailing list