[nem-bug] [Nemerle 0000552]: More type inference needed in nested local function

feedback at nemerle.org feedback at nemerle.org
Wed Dec 6 18:39:15 CET 2006


The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=552> 
======================================================================
Reported By:                nazgul
Assigned To:                nazgul
======================================================================
Project:                    Nemerle
Issue ID:                   552
Category:                   Compiler
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     resolved
Resolution:                 fixed
Fixed in Version:           
======================================================================
Date Submitted:             10-24-2005 00:24 CEST
Last Modified:              12-06-2006 18:39 CET
======================================================================
Summary:                    More type inference needed in nested local function
Description: 
using Nemerle;

def quick (xs ) 
{
def quicker (xs, ys)
{
| ([],_ )=> ys
| ([x],_) => x::ys
| (a::bs,_) => def part(left, right, x)
{
| (l,r, []) => quicker (l, a::quicker(r, ys))
| (l,r, x::xs) => if (x<a) part(x::l, r, xs) else part (l,x::r,xs)
}
part([],[],bs)
}
quicker (xs, [])
}


def pr(xs)
{
| [] => IO.printf("\n");
| x::xs => IO.printf("%i",x); pr(xs);
}

pr(quick([1,8,2,3,4,7]));

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

----------------------------------------------------------------------
 nazgul - 12-06-06 18:39 
----------------------------------------------------------------------
Fixed by one of Michal's patches on trunk. Testcase added in r7062.

Issue History
Date Modified  Username       Field                    Change              
======================================================================
10-24-05 00:24 nazgul         New Issue                                    
11-06-05 20:32 nazgul         Status                   new => confirmed    
12-06-06 18:39 nazgul         Status                   confirmed => resolved
12-06-06 18:39 nazgul         Resolution               open => fixed       
12-06-06 18:39 nazgul         Assigned To               => nazgul          
12-06-06 18:39 nazgul         Note Added: 0001563                          
======================================================================




More information about the bugs mailing list