[nem-bug] [Nemerle 0000842]: ICE when using yield in structs
feedback at nemerle.org
feedback at nemerle.org
Sat Jan 27 00:27:40 CET 2007
The following issue has been SUBMITTED.
======================================================================
<http://nemerle.org/bugs/view.php?id=842>
======================================================================
Reported By: Marat Vildanov
Assigned To:
======================================================================
Project: Nemerle
Issue ID: 842
Category: Compiler
Reproducibility: always
Severity: minor
Priority: normal
Status: new
======================================================================
Date Submitted: 01-27-2007 00:27 CET
Last Modified: 01-27-2007 00:27 CET
======================================================================
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.
======================================================================
Issue History
Date Modified Username Field Change
======================================================================
01-27-07 00:27 Marat Vildanov New Issue
======================================================================
More information about the bugs
mailing list