[nem-bug] [Nemerle 0000592]: ICE when mixing yield and functions

feedback at nemerle.org feedback at nemerle.org
Thu Dec 22 22:14:33 CET 2005


The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=592> 
======================================================================
Reported By:                nazgul
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   592
Category:                   Compiler
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             12-22-2005 22:14 CET
Last Modified:              12-22-2005 22:14 CET
======================================================================
Summary:                    ICE when mixing yield and functions
Description: 
using System;
using System.Collections;

class X {
        delegate A () :  void;

        static GetIt (mutable  args :  array [int]) :  IEnumerable
        {
                foreach ( arg :> int in args) {
                        Console.WriteLine ("OUT: {0}", arg);
                        mutable  a = fun() {
                                Console.WriteLine ("arg: {0}", arg);
                                ();
                        };
                        a ();
                        yield arg;
                }
        }

        static Main () :  int
        {
                mutable  total = 0;
                foreach ( i :> int in GetIt (   array[ 1, 2, 3])){
                        Console.WriteLine ("Got: " + i);
                        total += i;
                }

                if (total != 6)

                {
                         1;

                }

                else
        {
        {

                 0;
        }
        }
        }
}

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

Issue History
Date Modified  Username       Field                    Change              
======================================================================
12-22-05 22:14 nazgul         New Issue                                    
======================================================================




More information about the bugs mailing list