[nem-bug] [Nemerle 0000842]: ICE when using yield in structs

feedback at nemerle.org feedback at nemerle.org
Sun Jun 24 00:00:03 CEST 2007


The following issue has been RESOLVED.
======================================================================
<http://nemerle.org/bugs/view.php?id=842> 
======================================================================
Reported By:                Marat Vildanov
Assigned To:                divan
======================================================================
Project:                    Nemerle
Issue ID:                   842
Category:                   Compiler
Reproducibility:            always
Severity:                   minor
Priority:                   normal
Status:                     resolved
Resolution:                 fixed
Fixed in Version:           
======================================================================
Date Submitted:             01-27-2007 00:27 CET
Last Modified:              06-24-2007 00:00 CEST
======================================================================
Summary:                    ICE when using yield in structs
Description: 
For example, when compiling that code:
-----------------------------------------------------------
struct SomeStruct
{
 private first : int;
 private last : int;
    
 this (first : int, last : int)
 {
   this.first = first;
   this.last = last;
 }
    
 public FirstToLast : System.Collections.Generic.IEnumerable [int]
 {
   get
   {
     for (mutable i = first; i < last; i++)
     yield i;
   }
 }
}
-----------------------------------------------------------

I get:
-----------------------------------------------------------
error: internal compiler error: got some unknown exception of type
System.InvalidOperationException: Unable to change after type has been
created.
   at System.Reflection.Emit.PropertyBuilder.SetGetMethod(MethodBuilder
mdBuilder)
   at Nemerle.Compiler.PropertyBuilder.Compile()
   at Nemerle.Compiler.TypeBuilder.EmitImplementation()
   at Nemerle.Compiler.TypeBuilder._N__N_l32309_32340.apply_void()
   at Nemerle.Compiler.Solver.Enqueue(FunctionVoid action)
   at Nemerle.Compiler.TypesManager.EmitDecls()
   at Nemerle.Compiler.ManagerClass.Run()
   at Nemerle.CommandlineCompiler.MainClass.main_with_catching()
-----------------------------------------------------------

Without yield all works fine.
======================================================================

----------------------------------------------------------------------
 divan - 06-24-07 00:00 
----------------------------------------------------------------------
Fixed on r7714.

Issue History
Date Modified  Username       Field                    Change              
======================================================================
01-27-07 00:27 Marat Vildanov New Issue                                    
04-22-07 13:14 divan          Issue Monitored: divan                       
06-24-07 00:00 divan          Note Added: 0001923                          
06-24-07 00:00 divan          Assigned To               => divan           
06-24-07 00:00 divan          Status                   new => resolved     
06-24-07 00:00 divan          Resolution               open => fixed       
06-24-07 00:00 divan          Description Updated                          
======================================================================




More information about the bugs mailing list