[nem-bug] [Nemerle 0000587]: Generator Enumerable is incorrectly created

feedback at nemerle.org feedback at nemerle.org
Wed Dec 21 12:28:49 CET 2005


The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=587> 
======================================================================
Reported By:                nazgul
Assigned To:                malekith
======================================================================
Project:                    Nemerle
Issue ID:                   587
Category:                   Compiler
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     resolved
Resolution:                 fixed
Fixed in Version:           
======================================================================
Date Submitted:             12-18-2005 19:52 CET
Last Modified:              12-21-2005 12:28 CET
======================================================================
Summary:                    Generator Enumerable is incorrectly created
Description: 
using System;
using System.Collections.Generic;

namespace System.Query
{
        public partial class Sequence
        {
                public static Concat['a] (
                         first : IEnumerable ['a], 
                         second : IEnumerable ['a]) : IEnumerable ['a]
                {
                        when (first == null || second == null)
                                throw ArgumentNullException ();

                        foreach (element in first)
                                yield element;
                        foreach (element in second)
                                yield element;
                }
        }
}

def fst = [1,2,3];
def snd = [4,5,6];
foreach (x in Sequence.Concat (fst, snd))
   Nemerle.IO.printf ("%d\n", x);

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

----------------------------------------------------------------------
 malekith - 12-21-05 12:28 
----------------------------------------------------------------------
Resolved on trunk, r6029

Issue History
Date Modified  Username       Field                    Change              
======================================================================
12-18-05 19:52 nazgul         New Issue                                    
12-21-05 12:28 malekith       Status                   new => resolved     
12-21-05 12:28 malekith       Resolution               open => fixed       
12-21-05 12:28 malekith       Assigned To               => malekith        
12-21-05 12:28 malekith       Note Added: 0001050                          
======================================================================




More information about the bugs mailing list