rsdn/nemerle — Issue #247: ICE on cross using local functions and lambda
Author: CodingUnit
Created: 2012-01-20 07:41:11+00:00
State: open

This example gives ICE:
```nemerle
using Nemerle;
using Nemerle.Collections;
using Nemerle.IO;
using System.Diagnostics;
using System.Text;

module Test
{

Main () : void
{
def func = _ => ();

def init(process)
{
process.OutputDataReceived += func;
}

def loop()
{
def process = Process();
init(process);
}

loop()
}
}
```
Error says:
```
error : Internal compiler error, please report a bug to bugs.nemerle.org. You can try modifying program near this location.
C:\Program Files (x86)\Nemerle\Net-4.0\Nemerle.MSBuild.targets(219,9): error : internal compiler error: assertion ``False'' failed in file ncc\typing\LocalValue.n, line 196: ilkind is none for a local value func (id=6815)
в Nemerle.Compiler.LocalValue.CheckIL() в e:\OpenSource\Nemerle\Nemerle\ncc\typing\LocalValue.n:строка 198
в Nemerle.Compiler.LocalValue.get_IsParm() в e:\OpenSource\Nemerle\Nemerle\ncc\typing\LocalValue.n:строка 212
в Nemerle.Compiler.ILEmitter.emit_ce_ref(LocalValue decl, Boolean get_address_for_value_types) в e:\OpenSource\Nemerle\Nemerle\ncc\generation\ILEmitter.n:строка 1752
в Nemerle.Compiler.ILEmitter.emit(TExpr expr) в e:\OpenSource\Nemerle\Nemerle\ncc\generation\ILEmitter.n:строка 931
в Nemerle.Compiler.ILEmitter.emit_exprs_push(LocalBuilder[] local_variables, list`1 exprs) в e:\OpenSource\Nemerle\Nemerle\ncc\generation\ILEmitter.n:строка 1689
в Nemerle.Compiler.ILEmitter.emit_exprs(list`1 exprs) в e:\OpenSource\Nemerle\Nemerle\ncc\generation\ILEmitter.n:строка 1642
```