kevingadd/JSIL — Issue #37: Bug: Detecting lambda expressions for nested compiler generated classes
Author: matra774
Created: 2011-11-14 00:08:42+00:00
State: open

IlBlockTranslator.Translate_Newobj algoritm for detecting compiler generated calcualtes *emitInLine* based on *methodDef* or *methodDef.DeclaringType*

But if the method contains multiple lambda expressions, we should not only check if *DeclaringType* is compiler generated, but also if *DeclaringType.DeclaringType* is compiler generated (and so on).

I do not quite understand what is the purpose of *TypesAreEqual* check in *emitInLine* condition and how to write it for a generic (multiple levels of nesting) types.

Currently the such lambda expressions are trieated as ignored members, but are also not emitted inline, which causes run time error such as *$l$gc__DisplayClass4f* is undefined*

Matra