[nem-bug] [Nemerle 0000643]: Iterator as local fanction

feedback at nemerle.org feedback at nemerle.org
Sun Apr 2 19:16:25 CEST 2006


The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=643> 
======================================================================
Reported By:                VladD2
Assigned To:                
======================================================================
Project:                    Nemerle
Issue ID:                   643
Category:                   Compiler
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     new
======================================================================
Date Submitted:             04-02-2006 19:16 CEST
Last Modified:              04-02-2006 19:16 CEST
======================================================================
Summary:                    Iterator as local fanction
Description: 
If try to implement the iterator as local function:
def FromTo(from : int, to : int) : IEnumerable[int]
{
  for (mutable i = from; i <= to; ++i)
    yield i;
}

ngg generate this error:
error : yield used in a function returning void (it should be
System.Collections.Generic.IEnumerator[T] or
System.Collections.Generic.IEnumerable[T])
error : yield used in a function returning void (it should be
System.Collections.Generic.IEnumerator[T] or
System.Collections.Generic.IEnumerable[T])


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

Issue History
Date Modified  Username       Field                    Change              
======================================================================
04-02-06 19:16 VladD2         New Issue                                    
======================================================================




More information about the bugs mailing list