[nem-bug] [Nemerle 0000687]: invalid il for generic function returning closure

feedback at nemerle.org feedback at nemerle.org
Thu Nov 30 20:28:50 CET 2006


The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=687> 
======================================================================
Reported By:                aleksey
Assigned To:                malekith
======================================================================
Project:                    Nemerle
Issue ID:                   687
Category:                   Compiler (type engine)
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     resolved
Resolution:                 fixed
Fixed in Version:           
======================================================================
Date Submitted:             05-30-2006 18:24 CEST
Last Modified:              11-30-2006 20:28 CET
======================================================================
Summary:                    invalid il for generic function returning closure
Description: 
module M 
{ 
   cache[A,R](func : A -> R) : A -> R 
   { 
      def map = System.Collections.Generic.Dictionary.[A,R](); 
      args => 
           if (map.ContainsKey(args)) 
             map[args] 
          else 
         { 
             def result = func(args); 
             map[args] = result; 
             result             
          } 
   } 

   Main() : void 
   { 
       mutable ack; 
      ack = (a, b) => 
            if (b == 0) 
               ack(a - 1, 1) 
            else if (a == 0) 
               b + 1 
            else 
               ack(a - 1, ack(a, b - 1)); 
      ack = cache(ack); 

      System.Console.WriteLine(ack(3,12)); 
   } 
    
}
======================================================================

----------------------------------------------------------------------
 malekith - 11-30-06 20:28 
----------------------------------------------------------------------
r7031

Issue History
Date Modified  Username       Field                    Change              
======================================================================
05-30-06 18:24 aleksey        New Issue                                    
11-30-06 20:28 malekith       Status                   new => resolved     
11-30-06 20:28 malekith       Resolution               open => fixed       
11-30-06 20:28 malekith       Assigned To               => malekith        
11-30-06 20:28 malekith       Note Added: 0001540                          
======================================================================




More information about the bugs mailing list