[nem-bug] [Nemerle 0000733]: Short match & anonymous functions

feedback at nemerle.org feedback at nemerle.org
Fri Aug 11 11:39:43 CEST 2006


The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=733> 
======================================================================
Reported By:                IT
Assigned To:                Snaury
======================================================================
Project:                    Nemerle
Issue ID:                   733
Category:                   Compiler
Reproducibility:            always
Severity:                   major
Priority:                   normal
Status:                     resolved
Resolution:                 fixed
Fixed in Version:           
======================================================================
Date Submitted:             08-11-2006 02:03 CEST
Last Modified:              08-11-2006 11:39 CEST
======================================================================
Summary:                    Short match & anonymous functions
Description: 
public module Program
{
    Main() : void
    {
        def foo(f : int -> void)
        {
          f(0);
        }

        foo(fun(n) // OK
        {
          match(n)
          {
          | 1 => ()
          | _ => ()
          }
        });

        foo((n) => // OK
        {
          match(n)
          {
          | 1 => ()
          | _ => ()
          }
        });

        foo(fun(n) // OK
        {
        | 1 => ()
        | _ => ()
        });

        foo((n) => // error: there is nothing to match on, forgot function
parameter?
        {
        | 1 => ()
        | _ => ()
        });
    }
}

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

----------------------------------------------------------------------
 Snaury - 08-11-06 11:39 
----------------------------------------------------------------------
fixed on trunk (r6510)

Issue History
Date Modified  Username       Field                    Change              
======================================================================
08-11-06 02:03 IT             New Issue                                    
08-11-06 11:39 Snaury         Status                   new => resolved     
08-11-06 11:39 Snaury         Resolution               open => fixed       
08-11-06 11:39 Snaury         Assigned To               => Snaury          
08-11-06 11:39 Snaury         Note Added: 0001411                          
======================================================================




More information about the bugs mailing list